After a user successfully completes the Link flow, you’ll receive a public_token. Exchange this for an access_token that you can use for subsequent API calls.
Example Request
curl -X GET https://api.usecobalt.com/v1/link/token/exchange \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-G \
--data-urlencode "public_token=pt_198908HJDKJSH98789OHKJL"
Example Response
{
"success": true,
"token": "493JKLHIU98789hLKH9HHJH"
}
Store this access token securely - you’ll need it for all future API calls related to this user’s EHR connection.
The public token to exchange