Refreshing the Access Token

Once the access token expires, you can generate a new one using the refresh token. Refresh tokens are single use. When a refresh token is used to obtain an access token, a new refresh token is also issued. The expiry time of refresh token is seven days.

Send a POST request with the current refresh token.

curl -L -X POST "${IDCS_FQDN}/oauth2/v1/token" \
    --header "Authorization: Basic $AUTHORIZATION_VALUE" \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --data-urlencode 'grant_type=refresh_token' \
    --data-urlencode 'refresh_token=<refresh_token>'

The response body:

{
  "access_token": <access_token>,
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": <refresh_token>
}

Refresh tokens cannot be directly used for authenticating users.