Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have to get the data(XML data) which is having the OAUTH 1.0 Authorization.
Please le mw know how can i call the API with Oauht 1,o authorization, consuumerkey, and so on.
Authorization = OAuth oauth_consumer_key="MYTGRSFEJXB2EUIYHKSOZ905ST6",oauth_token="XW0IPKSYZIUHNCNRHEYHZCVCO2XJ",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1513672566",oauth_nonce="ZOxR3R",oauth_version="1.0",oauth_signature="dv%2FWowNk2mYAAgmWKnJPcJr6f7s%3D"
Some URL = "https://someurl.com/contacts"
How can i use the above and where should i call to get the data in powerBI desktop data source.
Thanks a lot in advance
Solved! Go to Solution.
Hi ,
let Source = Xml.Tables(Web.Contents("URL", [Headers=[#"Authorization"="OAuth oauth_consumer_key=""YOURKEY"", oauth_nonce=""YOURCODE"", oauth_signature=""YOURSIGNATURE"", oauth_signature_method=""HMAC-SHA1"", oauth_timestamp=""YOURTIMESTAMP"", oauth_token=""YOURTOKEN"", oauth_version=""1.0"""]] ),null,65001) in Source
As the error message prompted, the authentication type is not set to Anonymous. To modify the setting, navigate to File > Options and settings > Data source settings. Find your data source URL from the list, click Edit, edit the credential type to be Anonymous, and click Done. Please try again.
@mehaboob557,
Have you checked the sample code in the following blog? But please note that ithe code will only work for a small period of time until the token is invalid again, you would need to refresh the token and add the right value to the header.
let Source = Web.Contents("URL", [Headers=[#"Authorization"="OAuth oauth_consumer_key=""YOURKEY"", oauth_nonce=""YOURCODE"", oauth_signature=""YOURSIGNATURE"", oauth_signature_method=""HMAC-SHA1″", oauth_timestamp=""TIMESTAMP"", oauth_token=""YOURTOKEN"", oauth_version=""1.0"""]] ) in Source
Regards,
Lydia
Hi Lydia, I have read your post.
I do have all the necessary parameters: realm, consumer key, consumer secret, token id, token secret...
And my call works in Postman.
It somehow automatically generates from my parameters - his own: oauth_signature, oauth_nonce anf timestamp...
How do I generate them in Power Query?
Thanks!
I am facing this error
Please help me how can i over come this?
@mehaboob557,
Add a new blank query in Power BI Desktop, paste the following code to the Advanced Editor of the blank query, please replace required keys with your owns, then check if you get any error. In addition, do mask sensitive data when you upload screenshots.
let Source = Xml.Tables(Web.Contents("URL", [Headers=[#"Authorization"="OAuth oauth_consumer_key=""YOURKEY"", oauth_nonce=""YOURCODE"", oauth_signature=""YOURSIGNATURE"", oauth_signature_method=""HMAC-SHA1"", oauth_timestamp=""YOURTIMESTAMP"", oauth_token=""YOURTOKEN"", oauth_version=""1.0"""]] ),null,65001) in Source
Regards,
Lydia
Hi ,
let Source = Xml.Tables(Web.Contents("URL", [Headers=[#"Authorization"="OAuth oauth_consumer_key=""YOURKEY"", oauth_nonce=""YOURCODE"", oauth_signature=""YOURSIGNATURE"", oauth_signature_method=""HMAC-SHA1"", oauth_timestamp=""YOURTIMESTAMP"", oauth_token=""YOURTOKEN"", oauth_version=""1.0"""]] ),null,65001) in Source
As the error message prompted, the authentication type is not set to Anonymous. To modify the setting, navigate to File > Options and settings > Data source settings. Find your data source URL from the list, click Edit, edit the credential type to be Anonymous, and click Done. Please try again.
Thanks Lydia,
Where should i add this
let Source = Web.Contents("URL", [Headers=[#"Authorization"="OAuth oauth_consumer_key=""YOURKEY"", oauth_nonce=""YOURCODE"", oauth_signature=""YOURSIGNATURE"", oauth_signature_method=""HMAC-SHA1″", oauth_timestamp=""TIMESTAMP"", oauth_token=""YOURTOKEN"", oauth_version=""1.0"""]] ) in Source
in powerBI desktop.
Can u send me screen shot where i should navigate and add the above query in PBI desktop.
I can able to fecth from mysql or any other datasource using getdata button and then i will select the db i need.
But this type, i never did. Can u please help me where can i add the above query.
Thanks a lot @v-yuezhe-msft in advance
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
96 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |