---
title: "The OAuth 2.0 Token Endpoint"
method: POST
path: "/oauth2/token"
tags: ["public"]
---

# The OAuth 2.0 Token Endpoint

`POST /oauth2/token`

The client makes a request to the token endpoint by sending the
following parameters using the "application/x-www-form-urlencoded" HTTP
request entity-body.

> Do not implement a client for this endpoint yourself. Use a library. There are many libraries
> available for any programming language. You can find a list of libraries here: https://oauth.net/code/
>
> Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above!

## Response `200`

oauth2TokenResponse

- Oauth2TokenResponse — The Access Token Response
  - `access_token` string
  - `expires_in` integer
  - `id_token` string
  - `refresh_token` string
  - `scope` string
  - `token_type` string

## Other responses

- `400` — jsonError
- `401` — jsonError
- `500` — jsonError

## Changes

- **2022-02-16** `82d233540486` — 6 info
  - api operation id `oauth2TokenExchange` removed and replaced with `oauth2Token`
  - api tag `public` added
  - api tag `oAuth2` removed
  - added the non-success response with the status `400`
  - …2 more

[Change history](https://skmtc.dev/ory/apis/ory-hydra-api/changes/oauth2/token/post.md)

---

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