Forum Discussion

JeffManley's avatar
JeffManley
Frequent Visitor
4 years ago
Solved

DataSource.Error: Web.Contents failed to get contents from {URL} (404): Not Found; works in Postman

I'm receiving a 404 error when adding an offset token to the URL to grab the next page in the Power Query Editor; it works in Postman and CURL and returns the next 50 records without any errors. I'm ...
  • v-yingjl's avatar
    4 years ago

    Hi JeffManley ,

    Check these parts in the query whether they work:

    initReq = Json.Document(Web.Contents(baseuri)),
    newOffset = Json.Document(Web.Contents(uri))[next],
    newReq = Json.Document(Web.Contents(newUri)),

    Consider the basic authentication method in Power Query, you can refer this article to encode it in the query:

    Encoding basic authentication in an url with Power Query/M language 

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.