---
title: "Create access token"
method: POST
path: "/oauth/token"
tags: ["Authorization"]
---

# Create access token

`POST /oauth/token`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/oauth/token`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Exchanges an authorization code or refresh token for an access token

## Request body `application/x-www-form-urlencoded`

- object
  - `client_id` string
  - `client_secret` string
  - `grant_type` string
  - `code` string
  - `redirect_uri` string
  - `refresh_token` string

## Response `default`

default response

- ExternalOauthToken
  - `access_token` string
  - `expires_in` integer
  - `token_type` string
  - `refresh_token` string

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
