Forum Discussion

heathernicole's avatar
heathernicole
Continued Contributor
8 years ago

Connect to web APO in Power BI Desktop - HTTP request header parameters

I am trying to connect to Toggl's API using the Power BI web connector advanced settings. I'm not very familiar with headers, etc...

 

Toggl docs - mention this: You can authenticate in the reports API only with your API token. For HTTP Basic Auth you have to add the Authorization header with the request. The API token is the user name and the string 'api_token' is the password. Whenever possible please use the tools and interfaces provided by your http library to do Basic Auth (for example, curl uses the -u switch for that). 

 

but I'm not exactly sure how to format the parament for the Authorization below. Any help would be greatly appreciated!

 

 

5 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    heathernicole

    It is all depending on Toggl's API. For testing purpose, could your provide a valid curl statement as in this document Toggl's API:Detailed report? You can mask the api_token and send it via a private message.  The API Token can be found in your profile at https://www.toggl.com.

    curl -v -u 1971800d4d82861d8f2c1651fea4d212:api_token -X GET "https://toggl.com/reports/api/v2/details?workspace_id=123&since=2013-05-19&until=2013-05-20&user_agent=api_test"
    Successful respons

     

     

    • heathernicole's avatar
      heathernicole
      Continued Contributor

      Eric_Zhang - I've got the API token (I don't know how to mask it) - I think part of my problem is I've never done anything quite like this before. So I don't necessarily have a full of understanding of how it works in the first place.

       

      I can't seem to find any detailed documentation on Power BI's advanced settings for the Web connector either. 

       

       

       

       

       

       

      • McCow's avatar
        McCow
        Resolver III

        Hi heathernicole

         

        This tool had save me a many many hours of API connectors development:

        Postman

         

        I belive it can help you to.

         

        Best ragards