curl --request POST \
--url https://api-dev.narrative.io/authentication/exchange-token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": 123
}
'{
"user": {
"id": 10,
"name": "First Last",
"role": "partner_admin",
"company_id": 100,
"company_name": "ACME Corp"
},
"api_token": {
"access_token": "OI2Sfun5GnOS9zk0irkc3w==",
"access_token_expires_in": 1000,
"refresh_token": "yZYCdZrvHvlnEQw9/C640Q",
"refresh_token_expires_in": 10000
},
"legacy_token": "legacy-dsm-token"
}Exchange the current user access token for a new token scoped to the specified company. The user can only exchange their token to be scoped to another company to which they belong.
curl --request POST \
--url https://api-dev.narrative.io/authentication/exchange-token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": 123
}
'{
"user": {
"id": 10,
"name": "First Last",
"role": "partner_admin",
"company_id": 100,
"company_name": "ACME Corp"
},
"api_token": {
"access_token": "OI2Sfun5GnOS9zk0irkc3w==",
"access_token_expires_in": 1000,
"refresh_token": "yZYCdZrvHvlnEQw9/C640Q",
"refresh_token_expires_in": 10000
},
"legacy_token": "legacy-dsm-token"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the company to exchange the token for
Was this page helpful?