locked
400: Bad Request in Power Query RRS feed

  • Question

  • 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

    Wednesday, February 24, 2016 7:51 AM

Answers

  • This means that the server returned an error. There may be an error message in the body of the HTTP response; if so, you can use a tool like Fiddler to trace your HTTP traffic and see what the message is.
    Wednesday, February 24, 2016 5:48 PM
  • That error suggests we're trying to parse the response as JSON but it's actually XML. Is there a "Json.Document" formula in your query? Was it put in automatically or did you manually specify that the data is JSON?
    Thursday, February 25, 2016 2:39 PM
  • Again, I recommend you use Fiddler to examine the response for clues as to what was wrong with your request.
    Friday, February 26, 2016 3:06 PM

All replies

  • This means that the server returned an error. There may be an error message in the body of the HTTP response; if so, you can use a tool like Fiddler to trace your HTTP traffic and see what the message is.
    Wednesday, February 24, 2016 5:48 PM
  • Now i am able to get data but some times i am getting below error. But even if close and open the new excel workbook, i am getting same dataformat error.

    DataFormat.Error: We expected value, but found '<' at position 0.

    Please help


    • Edited by JanakiRam_k Thursday, February 25, 2016 8:49 AM
    Thursday, February 25, 2016 8:43 AM
  • That error suggests we're trying to parse the response as JSON but it's actually XML. Is there a "Json.Document" formula in your query? Was it put in automatically or did you manually specify that the data is JSON?
    Thursday, February 25, 2016 2:39 PM
  •  

    Hi, Below is the code that i am connecting via From Web source option.


    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
    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

    Friday, February 26, 2016 5:00 AM
  • Again, I recommend you use Fiddler to examine the response for clues as to what was wrong with your request.
    Friday, February 26, 2016 3:06 PM