Creates a Link token that you’ll use to initialize the Link flow in your frontend application.
Example Request
curl -X POST https://api.usecobalt.com/v1/link/token/create \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-d '{
"user_id": "user_12345",
"org_id": "org_67890"
}'
Example Response
{
"success": true,
"token": "lt_198908HJDKJSH98789OHKJL"
}
Update Mode
To use update mode for an existing connection, include the access_token
in your request:
curl -X POST https://api.usecobalt.com/v1/link/token/create \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-d '{
"user_id": "user_12345",
"org_id": "org_67890",
"access_token": "493JKLHIU98789hLKH9HHJH"
}'
The Link token is single-use and expires after 30 minutes.