Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I am very new to Power Query!!!
I am getting below error while connecting below url
Details: "Web.Contents failed to get contents from https://api.twitter.com/1.1/search/tweets.json?q=PowerPivot (400): Bad Request".
Please suggest, same error is coming for any search key word.
Regards,
Ram
Solved! Go to Solution.
Hi Janki,
Please reffer to below link it has similar problem and it suggest to change the code a bit.
Existing Code
let
Source = Web.Contents(“https://api.twitter.com/1.1/search/tweets.json?q=PowerPivot”)
in
Source
New Code
let
Source = Web.Contents(“https://api.twitter.com/1.1/search/tweets.json?q=PowerPivot&count=100″, [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
Hope this will help.
Regards
Gurpreet Sethi
Hi @janakiram were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector. I've tried windsor.ai, supermetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the Salesforce connector in the data sources list:
After that, just grant access to your Salesforce account using your credentials, then on preview and destination page you will see a preview of your Salesforce fields:
There just select the fields you need. It is also compatible with custom fields and custom objects, so you'll be able to export them through windsor. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url.
Where do we get the auth details from? Trying to use the API in PBI desktop.
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″””]]
Hi Janki,
Please reffer to below link it has similar problem and it suggest to change the code a bit.
Existing Code
let
Source = Web.Contents(“https://api.twitter.com/1.1/search/tweets.json?q=PowerPivot”)
in
Source
New Code
let
Source = Web.Contents(“https://api.twitter.com/1.1/search/tweets.json?q=PowerPivot&count=100″, [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
Hope this will help.
Regards
Gurpreet Sethi
Thanks Gurpreet, I will check on this.
By
Ram.
I have tried as per the advise but i got one error as " Download Failed" at "Close & Load" Step". Please help what could be the error cause.
By
Ram
Hi Ram,
Please share with the us Power Query code which gets generated.
Regards
Gurpreet Sethi
let
Source = Json.Document(Web.Contents("https://api.twitter.com/1.1/trends/available.json&oauth_consumer_key=***&oauth_nonce=682713328&oauth...
in
Source
Even getting error If i remove Json.Document() and only keep web.contents()
I am trying to pull the data as below request too
>> https://api.twitter.com/1.1/search/tweets.json?q=spotfire&count=100
BY
Ram
This started last Friday (March 4th, 2016). The only change event I can correlate this to is Salesforce Require Critical update on 3-4-2016: TLS 1.1 or higher for HTTPS connections.
Thanks for any suggestions to workaround.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
60 | |
60 | |
49 | |
45 |