Ask Your Question
0

Passing header to HTTP Client Destination

asked 2019-09-30 12:21:56 -0500

jonas_souza gravatar image

Hello ,

I'm facing another issue to connect to SalesForce (Mkt Cloud).

image description

Basically the process authenticate, returning a token. Then I use this token to load my data:

image description

This configuration is working fine when I move to postman e execute. But I believe that I'm passing something wrong to the last stage to authenticate.

Obs: I'm not using authentication in the last stage... only the token....

image description

Any idea of can be wrong?

Thank you

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-09-30 12:31:28 -0500

iamontheinet gravatar image

updated 2019-09-30 13:09:50 -0500

Hi!

Replace your expression with ${str:concat('Bearer ',record:value('/result/access_token'))} and it should work.

Cheers, Dash

edit flag offensive delete link more

Comments

Hello Dash, thank you for the answer.... It didn't work.... just to see if I understood it... the /result/access_token is my field retrieved from the flow to authenticate.... Should it really be in single quotes? I tried withtout but got an error of sintax, saying it can't identify the "/" ...

jonas_souza gravatar imagejonas_souza ( 2019-09-30 12:40:48 -0500 )edit

I also tried it str:concat('Bearer ',/result/access_token) Without success

jonas_souza gravatar imagejonas_souza ( 2019-09-30 12:48:24 -0500 )edit
iamontheinet gravatar imageiamontheinet ( 2019-09-30 12:51:18 -0500 )edit

BTW, what should the token look like... is it in format "BearerACTUALTOKENGOESHERE" as in the word "Bearer" followed by the token without any spaces or other chars in between?

iamontheinet gravatar imageiamontheinet ( 2019-09-30 12:52:48 -0500 )edit

The header should likes: Authorization: Bearer <my_generated_token> It contains a space after the "Bearer" which is a string indeed.

jonas_souza gravatar imagejonas_souza ( 2019-09-30 12:55:50 -0500 )edit
1

answered 2019-10-01 15:32:32 -0500

jonas_souza gravatar image

Hi :)

Just to return how I handled the situation.... as I couldn't use the HTTP Client Destination , I used the Process .

image description

So I've checked the option "Use OAuth 2" in the HTTP Client and set the authorization details there, and the JSON formated in the "Request Data"

image description

Then it worked fine, the only issue that I'm getting is that as it seems the HTTP client is authenticating only one type when my token expire, the remaining data fails. I'm looking an work around to this situation, accepting tips :)

Thank you Dash for the help, it helped in other things as well :)

Cheers

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-09-30 12:21:56 -0500

Seen: 153 times

Last updated: Oct 01