---
title: "POST /token"
method: POST
path: "/token"
---

# POST /token

`POST /token`

## Request body

- TokenRequest
  - `grant_type` string, required — The OAuth2 / OIDC Grant / Flow Type
  - `client_id` string, required — The OAuth2 client identifier
  - `code` string, required — The OAuth2 Authorization Code
  - `redirect_uri` string, required — The registered redirect (callback) URI for the OAuth2 application definition.
  - `scope` string, required — The requested OAuth2 scope.
  - `token_endpoint` string, required — The Token Endpoint URL for this OAuth2 Provider
  - `sslValidate` boolean, required — Validate the token endpoint SSL/TLS certificate
  - `resource` string — Resource parameter
  - `refresh_token` string — OAuth2 Refresh Token needed for Refresh Grant
  - `username` string — The username used with the OAuth2 Resource Owner Credential Grant
  - `password` string — The password used with the OAuth2 Resource Owner Credential Grant
  - `client_secret` string — The client secret for a confidential client
  - `customParams` object — List of key:value pairs

## Response `200`

200 response

- TokenResponse
  - `access_token` string, required — The OAuth2 Access Token
  - `id_token` string — The OpenID Connect ID Token
  - `refresh_token` string — The OAuth2 Refresh Token
  - `expires_in` string, required — How long the access token is valid (seconds)
  - `token_type` string — The OAuth2 Access Token type

## Other responses

- `400` — 400 response
- `500` — 500 response

## Changes

- **2026-07-17** `935d9319cbbf` — 1 info
  - api tag `Debugger` removed
- **2020-06-29** `a308ee341fe1` — 3 warning, 1 info
  - the optional response header `Access-Control-Allow-Origin` removed for the status `200`
  - the optional response header `Access-Control-Allow-Origin` removed for the status `400`
  - the optional response header `Access-Control-Allow-Origin` removed for the status `500`
  - api tag `Debugger` added

[Change history](https://skmtc.dev/rcbj/apis/idptools-api/changes/token/post.md)

---

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