<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00009GZgr6CADOkta Identity EngineWorkflowsAnswered2024-04-17T12:39:56.000Z2023-05-31T08:43:13.000Z2023-06-03T09:51:30.000Z

hx6b6 (hx6b6) asked a question.

How to use same active token in every HTTP request until it gets expired and request new one in Okta Workflows

Hi, I am trying to build custom connector from connector builder.

In each HTTP request for my purpose of interacting application it needs token value, "Authorization header: Bearer {{token}}". I have used helper flow and used authentication to generate token and passed "Authorization header: Bearer {{token}}" in body. for each HTTP request it generates new token in each request, is there a solution like scenario related to postman where we could save the token value in environment/global variable {{token}} and use it until it get expired and then request for new token.

The official documentation regarding access token is not available. 


  • Paul S. (Okta, Inc.)

    Hello @hx6b6 (hx6b6)​ Thank you for reacting out to our Community!

     

    Please see below the steps needed to achieve this:

    • HELPER flow generates the token and stores in a table and returns the token to the parent
    • Everywhere that you need to use this you retrieve the token from the table and build the header object
    • Have the API call wrapped in an IF/ERROR
    • on error
      • call the helper flow to generate new access token
      • build new header
      • call the same API

    Screenshot 2023-06-01 at 11.28.17 AM 

    Screenshot 2023-06-01 at 11.28.26 AMCommunity members help others by clicking Like or Select as Best on responses. Try it today.

    Watch and Learn: New Okta how-to videos, plus what's new this month in the May newsletter.

    Expand Post
  • hx6b6 (hx6b6)

    Hi Paul Stiniguta (Employee),

    Thank you for reaching out to the question and providing useful solution, place holder in table. I have also added a card of clear table to make sure no other value remains in the table. Does a connector builder also has a place holder like this ?

    Image is not available

    Expand Post

Loading
How to use same active token in every HTTP request until it gets expired and request new one in Okta Workflows