Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

HTTP 403 error

Greetings,   I can run the Python code in Pycharm, there are no errors.   import urllib.request with urllib.request.urlopen("URL/server/rest/services/CFA_Boundaries/FeatureServer/0/?start=0&limi...
  • PhilipTreacy's avatar
    5 years ago

    Hi Anonymous 

    It might be that the user agent in PBI is being blocked, or the URL is somehow being malformed inside PBI?

    You could try using Fiddler to see what traffic is going between PBI and the website so you can see what PBI is sending.

    https://www.telerik.com/fiddler

    Phil

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Phil,

     

    Thanks for the suggestion. I ran the Python script in Pycharm, that worked.

    I have never used Fiddler, so wouldn't know how to link to Power BI??

     

    I followed Chris Webb's Blog (https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/), to minimise the number of times entering the API token.

    I have the Web.Contents() icon in Power BI Fields tag, but don't see the icon in the Data Sources Settings as shown in the Blog??

     

    When I run the Parse JSOn option, I get DataFormat.Error:

    DataFormat.Error: We found extra characters at the end of JSON input.
    Details:
    Value=
    Position=0

     

    Still can't run the REST URL??

     

     

     

  • v-yingjl's avatar
    v-yingjl
    5 years ago

    Hi Anonymous ,

    Have you checked the json format is valid before using it in power bi? Invalid json format could casue the data format error.

    About HTTP 403 error, you can refer these simliar issues and articles:

    1. 403 Error when trying to access REST API 
    2. Power BI REST API gives 403 error (User does not have access to group) 
    3. FIX: Power BI error Access to the resource is forbidden 

     

    In addition, since there is only data field in the table, could you please consider sharing some screenshots in power query about this issue?

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.