cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Trying to get data from REST API and Bearer Authentication

I need to download data from an external API (I need to authenticate) and save to Sharepoint every month.  I'm new to Power Flow and struggling to setup the data connection.

I can setup the API get in Postman and working, but I can't setup get the HTTP connection to authenticate when I execute the flow.

 

Postman example:

2020-04-09 20_19_43-Postman.png

 

Here is the Flow HTTP connector setup:

2020-04-09 20_31_05-Edit your flow _ Power Automate.png

The result from the flow:

2020-04-09 20_30_06-Run History _ Power Automate.png

 

I see in the HTTP setup there is the Advanced Options for authentication - but not the option for Bearer Tokens.

 

Can someone help and tell me what I'm doing wrong with the config.

 

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

As I was typing up my response, I went through it character by character - it had to be something stupid I had done.  And it was.  I incorrectly added a : to Authorization in the header, so Authorization:

 

Once I removed that it is now working.  

 

Thank you for reaching out and helping me through it - Typing up the response helped me resolve it.

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

 

Hi @iainclarke ,

 

Now that you can use this request in postman to get the message, it means that the token you got is valid.

I checked your configuration and it seems to be correct.

 

Please try to directly copy the key and value in Headers to HTTP action and see if a similar problem still exists.

36.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

I'm still getting the same error.  I even tried to enter the value in text mode and it doesn't work.  I even copied the token back into Postman and it worked ok.  Not sure where to go with this.  I may have to use a different technology.

flowerror-2020-04-10 110222.png

Highlighted

Hi @iainclarke 

 

Can you check and confirm that the Authentication type is selected as none in the Flow HTTP action under the Advanced settings? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted

I had tried a number of variations of adding Authorization at the bottom, but none worked. 

2020-04-13 13_10_36-Edit your flow _ Power Automate.png

The current version has 'none'.  

 

 

 

 

 

You can see from the test run what results I'm getting.  Still hitting authorization issues:

2020-04-09 20_30_06-Run History _ Power Automate.png

 

 

 

 

 

 

 

And, just to make sure...  I can run the test in Postman with the same creds and works...

2020-04-13 13_14_38-Postman.png

Highlighted

As I was typing up my response, I went through it character by character - it had to be something stupid I had done.  And it was.  I incorrectly added a : to Authorization in the header, so Authorization:

 

Once I removed that it is now working.  

 

Thank you for reaching out and helping me through it - Typing up the response helped me resolve it.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (4,571)