Exchange token

​

Exchange an API key for an access token.

Body

required
application/json

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/auth/exchange
import Scalar from '@scalar/sdk';

const client = new Scalar({
  bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var
});

const authentication = await client.authentication.exchangePersonalToken({
  personalToken: 'scalar_example_personal_token',
});

console.log(authentication);
{
  "accessToken": "example-access-token"
}