Renewing the Access Token
Access token are typically short-lived. When an access token expires, you can renew it using a refresh token. To do this, send another POST request to the same token endpoint with these parameters:
grant_type: set torefresh_tokento specify that you are using a refresh token to obtain new access tokenclient_id: the same client identifier (i.e.sweetconnect)refresh_token: the refresh token you received during the initial token requestscope: again, set toopenid
curl -X POST --location "https://iam.my.sweetconnect.io/realms/sweetconnect-prod/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=refresh_token&client_id=sweetconnect&refresh_token=${REFRESH_TOKEN}&scope=openid"This request will return a new access token and a new refresh token that you can then use to authenticate further API calls.