cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cm13
Frequent Visitor

HTTP Authentication Failure Even With Token

I'm essentially trying to build a flow that automates HTTP requests to Marketing Cloud. I was able to build an HTTP request to get a token from Marketing Cloud and then subsequently parse the incoming payload. I'm able to isolate the token as dynamic content. However, when I make the next HTTP request (with said token in the header) I get an Unauthorized error. I don't know how that's possible when I'm calling out the token in the header. I also tried putting the token in the Raw and Custom Value Authorization drop-down types within the HTTP request, still no dice.

 

Thanks!

Snag_10fce56.png

Snag_1126fcc.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @cm13 

 

Thanks for your reply. Have you got a space after the Bearer? If not add a space between the Bearer and Dynamic mapping.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

6 REPLIES 6
abm
Super User
Super User

Hi @cm13 

 

Could you test the same token with Postman?

 

https://www.postman.com/downloads/

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
cm13
Frequent Visitor

I've been using the requests in Postman for months now, so I know that they work in Postman. For some reason, I can get the token in the flow, but the next request fails

Hi @cm13 

 

Thanks for your reply. Have you got a space after the Bearer? If not add a space between the Bearer and Dynamic mapping.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
cm13
Frequent Visitor

Yep, that fixed it! Thanks so much!

bbobillier
Advocate I
Advocate I

hello,

 

could you please describe the code which is in your Get test Token HTTP action and the json you are using just after ?

 

I am facing the same issue with a token which is expiring after 1h, and believe that your approach would fix my problem.

 

Thanks

Bertrand

ARC_afabozzi
Frequent Visitor

@cm13this is off topic but by any chance can I see what code you have on Get Test Token in your pic from your first post? I then assume the Parse JSON is from the body output of your get test token action. I am having a lot of trouble figuring out how to even get a bearer token to try this out. Thanks.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,994)