---
title: "Changes to Exchange authorization code for tokens"
method: POST
path: "/oauth2/token"
---

# Changes to Exchange authorization code for tokens

`POST /oauth2/token`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 3 of 24 revisions.

- **2026-10-28** `dbb5e203b445`: 9 breaking, 9 warning, 5 info
- **2026-10-21** `a90ab79f26a1`: 3 breaking, 12 warning, 12 info
- **2026-10-08** `bb0c59adf026`: 1 info

## Changes

- **2026-10-28** `dbb5e203b445`: 9 breaking, 9 warning, 5 info
  - the `client_id` request property's minLength was increased from `0` to `1` (media type: application/x-www-form-urlencoded)
  - the `client_id` request property's minLength was increased from `0` to `1` (media type: application/json)
  - the `requested_subject` request property's minLength was increased from `0` to `1` (media type: application/x-www-form-urlencoded)
  - the `requested_subject` request property's minLength was increased from `0` to `1` (media type: application/json)
  - the `subject_token` request property's minLength was increased from `0` to `1` (media type: application/x-www-form-urlencoded)
  - the `subject_token` request property's minLength was increased from `0` to `1` (media type: application/json)
  - added `#/components/schemas/ErrorResponse, #/components/schemas/OAuthErrorResponse` to the response body `oneOf` list for the response status `400`
  - the response's body type changed from `object` to no type for status `400`
  - removed the required property `error` from the response with the `400` status
  - the `subject_token_type` request property's maxLength was set to `128` (media type: application/x-www-form-urlencoded)
  - the `subject_token_type` request property's maxLength was set to `128` (media type: application/json)
  - removed the optional property `error_description` from the response with the `400` status
  - removed the optional property `error_uri` from the response with the `400` status
  - removed the optional property `id_token` from the response with the `200` status
  - removed the optional property `state` from the response with the `400` status
  - added the new `authorization_pending` enum value to the `error` response property for the response status `401`
  - added the new `expired_token` enum value to the `error` response property for the response status `401`
  - added the new `slow_down` enum value to the `error` response property for the response status `401`
  - added the new optional request property `device_code` (media type: application/x-www-form-urlencoded)
  - added the new optional request property `device_code` (media type: application/json)
  - added the new `urn:ietf:params:oauth:grant-type:device_code` enum value to the request property `grant_type` (media type: application/x-www-form-urlencoded)
  - added the new `urn:ietf:params:oauth:grant-type:device_code` enum value to the request property `grant_type` (media type: application/json)
  - added the non-success response with the status `500`
- **2026-10-21** `a90ab79f26a1`: 3 breaking, 12 warning, 12 info
  - the `error` response's property type changed from `object` to `string` for status `400`
  - removed the required property `error/code` from the response with the `400` status
  - removed the required property `error/message` from the response with the `400` status
  - removed the optional property `error/metadata` from the response with the `400` status
  - removed the optional property `error/requestId` from the response with the `400` status
  - added the new `access_denied` enum value to the `error` response property for the response status `400`
  - added the new `invalid_client` enum value to the `error` response property for the response status `400`
  - added the new `invalid_grant` enum value to the `error` response property for the response status `400`
  - added the new `invalid_request` enum value to the `error` response property for the response status `400`
  - added the new `invalid_scope` enum value to the `error` response property for the response status `400`
  - added the new `invalid_target` enum value to the `error` response property for the response status `400`
  - added the new `invalid_target` enum value to the `error` response property for the response status `401`
  - added the new `server_error` enum value to the `error` response property for the response status `400`
  - added the new `unauthorized_client` enum value to the `error` response property for the response status `400`
  - added the new `unsupported_grant_type` enum value to the `error` response property for the response status `400`
  - added the new optional request property `requested_subject` (media type: application/x-www-form-urlencoded)
  - added the new optional request property `requested_subject` (media type: application/json)
  - added the new optional request property `subject_token` (media type: application/x-www-form-urlencoded)
  - added the new optional request property `subject_token` (media type: application/json)
  - added the new optional request property `subject_token_type` (media type: application/x-www-form-urlencoded)
  - added the new optional request property `subject_token_type` (media type: application/json)
  - added the new `urn:ietf:params:oauth:grant-type:token-exchange` enum value to the request property `grant_type` (media type: application/x-www-form-urlencoded)
  - added the new `urn:ietf:params:oauth:grant-type:token-exchange` enum value to the request property `grant_type` (media type: application/json)
  - added the optional property `error_description` to the response with the `400` status
  - added the optional property `error_uri` to the response with the `400` status
  - added the optional property `issued_token_type` to the response with the `200` status
  - added the optional property `state` to the response with the `400` status
- **2026-10-08** `bb0c59adf026`: 1 info
  - added the optional property `error/requestId` to the response with the `400` status

---

[Operation](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/docs/oauth2/token/post.md) - [API](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api.md) - [Page](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/changes/oauth2/token/post)
