cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Passing Bearer Token to REST GET

alex_panganiban
Contributor

I received a token from a authorization REST POST call. I now need to pass this token as the bearer token of a REST GET call. How can I correctly pass my token to the REST GET snap?

I was able to do this successfully using Postman (see screen pic). Now I just need to create a Snaplogic solution that will do the same.

image

Thanks, Alex

2 REPLIES 2

dmiller
Admin Admin
Admin

Take a look at this pattern: Connecting to Marketo with the REST Snap Pack


Diane Miller
Community Manager

Well, hey there! Firstly, thanks so much for your quick and awesome response. It just so happens, mere seconds before your alert and pattern came in, I figured out my problem. When defining the โ€œAuthorizationโ€ value for my HTTP Header, I was not prepending the token I was passing with the word, โ€œBearer.โ€ Once I did this, then my REST GET call worked like a charm! Hereโ€™s a little illustration of what I did.

I used a mapper snap just before the REST GET. In the mapper, I created a string bearer token value by concatenating "Bearer " with the actual token value. I placed in value in a variable called, bearerToken. In the subsequent REST GET snap, I used this variable in my Authorization header value.

Thanks so much for your help! I really appreciate it.

All my best, Alex

image
image