Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
michaelsh
Kudo Kingpin
Kudo Kingpin

Authorization Header for OAuth 1.0 API

I have a Postman OAuth 1.0 API call which is working great.

I have all the necessary parameters: realm, consumer key, consumer secret, token id, token secret...

I send them in headers with HMAC-SHA256. Works fine in Postman.

I need to construct the same call in Power Query. I notice that Postman automatically creates this header (below).
While I do have the data for the first 4 parameters, but how do I construct the others (in red)?

Thank you!

 

Authorization:
OAuth realm="11111111",
oauth_consumer_key="XXXXXXXXXXXXX",
oauth_token="YYYYYYYYYYY",
oauth_signature_method="HMAC-SHA256",
oauth_timestamp="9999999999",
oauth_nonce="ZZZZZZZZ",
oauth_version="1.0",
oauth_signature="QQQQQQQQQQQ"

5 REPLIES 5
jorge7281
New Member

check this URL https://oauth1.wp-api.org/docs/basics/Signing.html : point 2.3 Signing Requests.

You have to create a basestring with the different info you have then create the signature key (consumer secret & token secret) with those 2 "strings" you can generate the HMAC text with online website like https://www.devglan.com/online-tools/hmac-sha256-online

boley2131
Frequent Visitor

Did you ever get this figured out?  I'm facing the same challenge.  Thanks!

michaelsh
Kudo Kingpin
Kudo Kingpin

Having read a bit more, I understand that:
oauth_nonce can be a random number (maybe encoded?)

- oauth_timestamp - is just a timestamp
- which leaves us only with the question - how do I create oauth_signature?

I understand that it is somehow encoded from all other parameters...

Maybe someone can please share their Power Query code for this....

Thanks a lot!

Anonymous
Not applicable

Hi @michaelsh 

Could you tell me if your problem has been solved? If it is, kindly share your workround and Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem.

 

Best Regards,

Rico Zhou

No, @Anonymous , the problem is still there.

 

For OAuth1.0 authorization I need to create an oauth_signature.

To do that I need HMAC-SHA1 hash function.

How do I do it in Power Query, without R/Python?

Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.