API Example
BEARER TOKEN LIFESPAN
The lifespan of a Bearer token is one hour (3600 seconds) for both sandbox and production environments.
To try our APIs, you can either use your own development platform/tool or the Try It interface in our developer portal.
Using your own development platform/tool
Run the following in your platform with your sandbox credentials provided by Optum.
curl --request POST \
--url https://sandbox-apigw.optum.com/apip/auth/v2/token \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '
{
"client_id": "your client ID",
"client_secret": "your secret",
"grant_type": "client_credentials"
}
Here is an example output:

Using interactive Try It interface
- Go to API reference's Try It page.
- For example, to generate a Bearer token, click API Tools in the developer portal.
- Click
/apip/auth/v2/token
. - Use your sandbox
client Id
andclient secret
provided by Optum in their respective fields, and useclient_credentials
in the grant_type field and click Try It.

Try It Feature
Related Topics
Updated about 19 hours ago