Forum Discussion
Bad Request in Power Query
- 10 years ago
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
SourceNew 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
SourceHope this will help.
Regards
Gurpreet Sethi
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.
- janakiram10 years agoRegular Visitor
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
- sethigurpreer10 years agoFrequent Visitor
Hi Ram,
Please share with the us Power Query code which gets generated.
Regards
Gurpreet Sethi
- janakiram10 years agoRegular Visitor
let
Source = Json.Document(Web.Contents("https://api.twitter.com/1.1/trends/available.json&oauth_consumer_key=***&oauth_nonce=682713328&oauth_signature_method=HMAC-SHA1&oauth_signature=***&oauth_timestamp=1456461531&oauth_token=***&oauth_version=1.0"))
in
SourceEven 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