---
title: "Get OpenID access token"
method: POST
path: "/v1/oauth2/token"
tags: ["Authentication"]
---

# Get OpenID access token

`POST /v1/oauth2/token`

Get an access token for OpenID authentication

A JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The JWT must be signed using the RS256 algorithm with your server's private key, and include specific claims as outlined in [Authentication with OpenID Connect](https://developers.pismo.io/pismo-docs/docs/authentication-with-openid).

**Note**: Many of the endpoints in the Pismo API require you to pass a JWT that you generated which includes a Pismo account ID (`uid` or `account_id`) or an account ID from an external system used in place of the Pismo account ID (`external_account_id`). Further calls to Pismo endpoints will require this token in the Authorization header.
 
 For more information about account-specific tokens, refer to [Endpoints that require an account-specific token](https://developers.pismo.io/pismo-docs/reference/endpoints-that-require-an-account-specific-token) and [Endpoints that require an external ID-specific token](https://developers.pismo.io/pismo-docs/reference/endpoints-that-require-an-external-id-token).

## Request body

- object
  - `token` string, required — JSON Web Token (JWT) created using the RS256 algorithm and including the required claims as outlined in [Authentication with OpenID Connect](https://developers.pismo.io/pismo-docs/docs/authentication-with-openid). For more information, refer to [Generating a JWT](https://developers.pismo.io/pismo-docs/docs/authentication-with-openid#generate-your-jwt).

## Response `201`

Created

- object
  - `token` string — Pismo-signed JWT used to make authenticated requests
  - `refresh_token` string — JWT used to refresh an expired Pismo access token
  - `expires_in` string — Expiration time (in seconds) for the Pismo access token

## Other responses

- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.net/pismo/apis/platform-authentication.md) · [All operations](https://skmtc.net/pismo/apis/platform-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pismo/platform-authentication/revisions/935b62e16de4/schema)
