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>
Generate a Bearer token
In interactive Try It! interface
Use the API reference's Try It interface as shown below by using our sandbox predefined values to familiarize yourself with our APIs.
- For example, to generate an API Bearer token in the developer portal, go to API Tools.
- Click
/apip/auth/v2/token. - Use your sandbox credentials provided in the
client Idandclient secretfields and enterclient_credentialsin the grant_type field and click Try It.
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"
}'

Generate Bearer Token Try It Feature Example
In your development platform
- Download and import our OpenAPI Spec into your platform.
- Under the Prior Authorization V1 folder, click the
Generate JWT token with payload - Medical Networkendpoint. - Click the
Bodytab and enter your specific API credentials provided by Optum.
client_id: your client_idclient_secret: your client_secretgrant_type: client_credentials
- Run the request to generate the Bearer token.
Related Topics
Updated 3 days ago
Did this page help you?