Generate a Bearer Token
BEARER TOKEN LIFESPAN
The lifespan of a Bearer token is one hour (3600 seconds) for both sandbox and production environments.
We recommend automating transactions to use the tokens generated over the token lifespan. Obtaining tokens for each transaction is less efficient and does not improve the security criteria for any transactions.
Content-Type: application/json
Authorization: Bearer <Your-Access-Token>
In your 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:
In interactive Try It interface
- Go to API reference's Try It page.
- For example, to generate an API Bearer Token, click API Tools in the developer portal.
- Click
/apip/auth/v2/token. - Use your sandbox
client Idandclient secretprovided by Optum in their respective fields, and useclient_credentialsin the grant_type field and click Try It.

Try It Feature
Related Topics
Updated 13 days ago