Refresh Token Flow

Following process describes how to renew your application's access token if a refresh token is present.

Request

curl --request POST \
--url 'https://auth.loomai.com/oauth/token' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'audience=https%3A%2F%2Fapi.loomai.com%2F&grant_type=refresh_token&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&refresh_token={REFRESH_TOKEN}'

Parameter

Description

audience

Set to https://api.loomai.com/ (urlencoded).

grant_type

Set to refresh_token

client_id

Your application's Client ID.

client_secret

Your application's Client Secret.

refresh_token

Your previously obtained refresh token. See Authorization Scopes for details.

Response

{
"access_token": "eyJz93a...k4laUWw",
"token_type": "Bearer",
"expiry": 3600
}