---
title: "Create API Access Token"
method: POST
path: "/api/token"
tags: ["Token"]
---

# Create API Access Token

`POST /api/token`

## Request

- Base URL: `https://api.chartmetric.com`
- URL: `https://api.chartmetric.com/api/token`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/chartmetric/apis/chartmetric-developer-api/docs/api/token/post.ts> (a function with typed inputs; its response is checked against the schema)

Exchange a refresh token for a short-lived JWT access token used to authorize Developer API requests.

## Request body

- object
  - `refreshtoken` string, required: Long-lived refresh token issued at signup; used to mint a fresh short-lived access token.

## Response `200`

Success

- object
  - `token` string, required: Short-lived JWT access token to use as `Authorization: Bearer <token>` on subsequent Developer API calls.
  - `expires_in` integer, required: Number of seconds after which the access token expires.
  - `refresh_token` string, required: Long-lived refresh token for obtaining a new access token (echoes the token supplied in the request).
  - `scope` string, required: Level of access granted by the token. Currently always `api`.

---

[API](https://skmtc.dev/chartmetric/apis/chartmetric-developer-api.md) - [All operations](https://skmtc.dev/chartmetric/apis/chartmetric-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chartmetric/apis/chartmetric-developer-api/revisions/94dac96833a3?raw)
