---
title: "Get Token"
method: POST
path: "/auth/token"
tags: ["authentication"]
---

# Get Token

`POST /auth/token`

Get a new access token and refresh token

After calling this route once, it's preferable to call /auth/refresh_token 
instead of sending the client id and secret every time

## Request body

- TokenRequest — Request model for token generation
  - `client_id` string, required
  - `secret` string, nullable
  - `client_secret` string, nullable

## Response `200`

Successful Response

- TokenResponse — Response model for token generation
  - `access_token` string, required
  - `expires_in` string, date-time, required
  - `refresh_token` string, required
  - `refresh_token_expires_in` string, date-time, required
  - `token_type` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/avanan/apis/avanan-api.md) · [All operations](https://skmtc.dev/avanan/apis/avanan-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/avanan/avanan-api/revisions/4048d3949a4a/schema)
