Forum Discussion

d_u_a's avatar
d_u_a
Helper I
8 years ago

For Pull data from REST API with Authentication Should I Use Content Pack

We are using our own Rest Api Authentication .
In our scenario first Http Post request is sending with username and password ,
Response of first request have some tokens in its header .
Second 
Http Post request is using header tokens of first request's response. Response of second request have some tokens in its header and we are sending these tokens and set-cookie parameters to Third Http Post request . And coming datas in this way.

My Questions :
Should i use Content Pack because of i need Header parameters when sending and taking requests?
Or
Should i get Header parameters of responses and reuse them to send another request by writing M Query as Custom Data Connector?
Or 
Should i use Content Pack and Custom Data Connector together?

4 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi d_u_a,

     

    Is it the "OAuth v2 authentication"? If so, I would suggest you try the Custom Data Connector.

     

    Best Regards,

    Dale

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi 

     

    I see you have mentioned that you have used set-cookies in your http post request which was your third call and got the data.

     

    I'm following the similar pattern where I'm sending multiple https requests. Initially to get the access_token and then to get the cookies to complete my authentication process. I'm building a custom data connector and able to get the access_token. Unfortunately, I'm facing a challenge in using "set-cookies" which is my call to our cookies url and will have the access_token as a Headers in my request. I would really appreciate if you could share the example of how you used set-cookies successfully. 

    Happy holidays. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Team

     

    I'm still chasing for the information on cookies. I would appreciate any response.