# OAuth

> Request access tokens with the authorization code, client credentials or refresh token grant, validate tokens and test access with the OAuth endpoints.

- **Product:** DS Server
- **Section:** Documentation
- **Kind:** Endpoint
- **Path:** DS Server > API Reference > Web API > OAuth
- **289 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/web-api/oauth/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/web-api/oauth/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/web-api/oauth/llms-full.txt

---

The OAuth endpoints request access tokens and check whether a token is valid.

| Method | Endpoint | Description |
|---|---|---|
| [`GET`](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/authorize/get/llms-full.txt) | [/oauth/authorize](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/authorize/get/llms-full.txt) | Requests an authorization code or an access token and redirects to the redirect URI with the result. |
| [`POST`](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/token/post/llms-full.txt) | [/oauth/token](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/token/post/llms-full.txt) | Requests an access token with the "authorization\_code", "client\_credentials" or "refresh\_token" grant type. |
| [`POST`](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/validatetoken/post/llms-full.txt) | [/oauth/validatetoken](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/validatetoken/post/llms-full.txt) | Checks whether an access token is valid. |
| [`GET`](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/test/get/llms-full.txt) | [/oauth/test](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/test/get/llms-full.txt) | Tests whether the access token of a request grants access. |

---

## In This Section

- [/oauth/authorize](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/authorize/llms-full.txt): The /oauth/authorize endpoint of the DS Server Web API and its GET method, which redirects to a redirect URI with an authorization code or access token.
- [/oauth/test](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/test/llms-full.txt): The /oauth/test endpoint of the DS Server Web API and its GET method, which tells whether the access token of a request grants access without doing any work.
- [/oauth/token](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/token/llms-full.txt): The /oauth/token endpoint of the DS Server Web API and its POST method, which issues access tokens for the code, client credentials and refresh token grants.
- [/oauth/validatetoken](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/validatetoken/llms-full.txt): The /oauth/validatetoken endpoint of the DS Server Web API and its POST method, which answers true or false for an access token this instance issued.

---

## Nearby

- **Previous:** [GET /documentprocessing/barcodes/istextvalid](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/barcodes-istextvalid/get/llms-full.txt)
- **Next:** [/oauth/authorize](https://docs.textcontrol.com/ds-server/reference/web-api/oauth/authorize/llms-full.txt)
