Forum Discussion

ADG's avatar
ADG
New Contributor
5 years ago
Solved

authorization from power bi

Hello all,

 

will try to explain as good as possible my problem:

 

my supplier uses swagger - i have until now used the swagger ui web pages to test the content etc from the api's.

 

However, i have to manually update the bearer key in powerbi in order to continue access to the data, every half hour I must renew. Is this the way it is in Swagger? Or can I somehow get a fixed api key that I can use? renewing every half hour is not an option for us.

 

appreciative of all help.

  • Hello. The rate at which the API key needs to be refreshed is not related to Swagger but rather the way the provider has built their API. You'd have to check with them if they can provide you with an easier solution.

  • ADG's avatar
    ADG
    5 years ago

    thank you both for replying, I have spoken with our supplier that owns the api and he will adjust the validity period of the tokens.

3 Replies

  • Hello. The rate at which the API key needs to be refreshed is not related to Swagger but rather the way the provider has built their API. You'd have to check with them if they can provide you with an easier solution.

    • LinoTadros's avatar
      LinoTadros
      Community Hero

      As Ron said, this is not a swagger issue but a time out placed on the Bearer token by the API provider.

      That said, every Bearer authentication return 2 things: the actually token and also a renewable key with the time out value (the default is 3600 seconds)

      So try to keep both and after the Token expires, you can call with the key to renew the access token and keep going

       

      Hope that helps

      Cheers

      Lino

      • ADG's avatar
        ADG
        New Contributor

        thank you both for replying, I have spoken with our supplier that owns the api and he will adjust the validity period of the tokens.