Passing Bearer Token to REST GET

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.

Thanks, Alex

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

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

1 Like