How to keep data after close the browser

Hi, I want to save a Token for connect to an APi, even after close the browser.
If there are something like session storage..
The token has an expired time, which is 1 day, so if the the expired time is out, I get a new token. I want to save the token and the expired time in some place, even after close the browser, and the next time I use the app, if the token is available, use that token for APIs calls, in other case, get a new one.

Hello @Zheng ,

Create a Refresh Token API to Manage Token Expiration

The API should issue both an access token and a refresh token. When the access token expires, use the refresh token to obtain a new access token, triggering the refresh on page load.

Steps:

  1. Set the URL Parameter: [

    ]

  2. Configure Custom Authentication: [

    ]

  3. Set the Variable: [image]

  4. Set the API Request: [

    ]

  5. Run the API Request and Connect with Authentication:

  6. API Output:
    image

Thank You.

2 Likes