When your application receives a refresh_token, it can use it to receive new access_token\s or id_token\s
Make sure that you have the following information :
  1. OpenID Provider Metadata (autodiscovery URL) : Your admin can provide you with the URL which lives in https://${realm.url}/oauth/${realm.name}/.well-known/openid-configuration
  2. Your client credentials : client_id & client_secret (optional)

Token request

POST /token_endpoint HTTP/1.1
Host: oauth.server
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token=A_REFRESH_TOKEN
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET
ParameterRequiredDescription
grant_typeYesThe value must be refresh_token
refresh_tokenYesthe refresh_token received during authentication
client_idNoOnly required if the client authenticates through client_secret_post or does not authenticate (for native clients)
client_secretNoOnly required if the client authenticates through client_secret_post
client_assertionNoOnly required if the client authenticated through client_secret_jwt or private_key_jwt
client_assertion_typeNoOnly required if a clientassertion is used. The value must be _urn:ietf:params:oauth:client-assertion-type:jwt-bearer
resourceNoThe URI of a resource which has been declared in the Realm

Token response

Error response

HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{
"error": "AN_ERROR_CODE",
"error_description": "AN_ERROR_DESCRIPTION"
}

Successful response

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{
"access_token": "AN_ACCESS_TOKEN_VALUE",
"id_token" : "AN_ID_TOKEN",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token" : "A_NEW_REFRESH_TOKEN"
}
If the application is configured with Refresh Token Rotation, it'll receive a new refresh_token with every request. Using an old refresh_token will invalid the authorization grant and the newer refresh_token