Set User Refresh Token Expiration Time
Set the expiration time in seconds for user session refresh tokens.
Path parameters
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
Body
Required
-
The time in seconds that a user session refresh token is valid for after it is issued. After this time, the token is expired and the user must re-authenticate.
The expiration time must be between 30 minutes and 5 years, inclusive. The default expiration time is 60 days.
Minimum value is
1800
, maximum value is15552000
. Default value is5184000
.
PUT
/groups/{groupId}/apps/{appId}/security/refresh_token_expiration
curl \
--request PUT 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/security/refresh_token_expiration' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"expiration_time_seconds":5184000}'
Request examples
{
"expiration_time_seconds": 5184000
}