I am using client API by OAuth to access data in logic app. But token gets expire after some minutes so need to regenerate token for API and use it.

Shubham Chougule 21 Reputation points
2022-11-21T04:05:08.46+00:00

I am using client API by OAuth to access data in logic app. But token gets expire after some minutes so need to regenerate token for API and use it.

Is there any way to automate this process to generate the token and use.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,255 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,741 Reputation points
    2022-11-22T08:20:56.357+00:00

    @Shubham Chougule Thanks for reaching out. You need to generate the token in each new request rather than hardcoding the already generated token. To get the token you need to call your API token endpoint leveraging the HTTP action. Once you receive the token from your API you can pass the newly generated token in your next actions of your workflow.

    For your reference sharing this article where we are getting OAUTH token from the twitter API endpoint. In case if your workflow takes a lot of time before the token expires then I will suggest to make another HTTP call to your API token endpoint to get the new token/renewal call to renew the existing token so you can leverage the token in your next action of your workflow.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.