API Setup
Authentication protocols: Optum Real APIs utilize OAuth 2.0 for secure authentication and data transfer. OAuth tokens function as bearer tokens for accessing our gateway
ClientID and secret key: You can request a ClientID and secret key for our sandbox endpoint prior to subscribing to an API or while waiting for your production ClientID and secret key, which are available via your Optum AI Marketplace account or email after you have subscribed to an API. The provider IT team must use the API credentials to generate bearer token for either sandbox endpoint or production endpoint.
NOTE: You will have two sets of credentials:
- One for the sandbox — to help you test our APIs before signing a contract or after.
- One for production — provided after signing a contract or after processing a subscription.
These credentials are specific and unique to an API environment and your organization.
If you do not have your credentials, please reach out to your account manager or API consultant for further assistance.
How to access a sandbox
- Request for sandbox account without any financial obligations. This will include ClientID and secret key for sandbox.
- Generate an authorization/bearer token by passing Client ID and secret key "here" or Use Postman to generate a bearer token.
- Test our APIs using "try it" interface or postman. (Please refer to individual API Technical Reference Guide for additional details)
Bearer token: Token should be generated using the API credentials Optum provides for sandbox access or production credentials received after subscribing to an API.
Instance | URL | Notes |
---|---|---|
Sandbox | https://sandbox-apigw.optum.com/apip/auth/sntl/v1/token | Use ClientID and secret provided in the request sandbox response email to generate token through this URL. |
Production | https://apigw.optum.com/apip/auth/sntl/v1/token | Use ClientID and secret in the account section after the API subscription status is “subscribed” to generate token through this URL. |
Generate an API 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 using 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.
See sample request and response bearer token format below for reference:
Bearer token request header: **
Content-Type: application/json
Authorization: Bearer
Bearer token request and response example:
Bearer token request format
curl -X POST \
'** (placeholder for URL)/**' \
-H 'Content-Type: application/json' \
-d '{
"client_id": "<Your-ClientId>",
"client_secret": "<Your-ClientSecret>",
"grant_type": "client_credentials"
}'
Bearer token response example:
{
"access_token":
"eyJraWQiOiIxIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhY2Nlc3NfdG9rZW4iOiJkc1JvRTMzSFYzbnpkY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