---
title: "Obtain access token"
method: POST
path: "/token"
tags: ["authorization"]
---

# Obtain access token

`POST /token`

OAuth 2.0 token endpoint to exchange authorization code for access token, request token with client credentials, or refresh an existing token.

- Use Authorization Code grant to obtain access token for a Company to use with the Company API.
- Use Refresh Token grant to obtain a new access token using a refresh token.
- Use Client Credentials grant to obtain access token for the General API.

## Response `200`

OK

- Token
  - `tenant_id` string, uuid — The id for the tenant that for this token. This field will be empty when the tenant_type is `general`
  - `tenant_type` 'general' | 'company' — The type of tenant that for this token.
  - `access_token` string
  - `token_type` string
  - `expires_in` integer
  - `refresh_token` string — Returned for authorization_code and refresh_token grant types. The client_credentials grant expected that refresh are done by making another `/token` request with client_credentials grant.
  - `connection_id` string, uuid — The id for the connection that for this token. This field will be empty when the tenant_type is `general`

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/bokio/apis/company-api.md) · [All operations](https://skmtc.net/bokio/apis/company-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bokio/company-api/revisions/1bb5d09ce15e/schema)
