Specifying a Custom Access Token Expiration

You can specify a custom access token expiration value in an access token request to Oracle Identity Cloud Service.

Note:

The custom token expiry is still subject to the overall access token expiry rules. See the Token Expiry Table.

Example Request

curl -k -i
-H 'Authorization: Basic dGVzdERvbWFpbkFkbWluOmZmNGUzNGE3LWVlNGQtNDAzNy1iNmNmLTUwZGVmMmNjMzM5Zg=='
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--request POST 'https://<tenant-base-url/oauth2/v1/token'
-d 'grant_type=client_credentials&scope=urn:opc:idm:__myscopes__%20urn:opc:resource:expiry=300'

Example Response


{"access_token":"eyJ4NXQjUzIc....q3E8x1tTEwPthTg",
        "token_type":"Bearer",
        "expires_in":300
}