> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nemu.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Endpoints

> The token, authorize, and version endpoints that issue and describe access

These endpoints issue tokens and describe the API. For the resources you call with a token,
see the [API reference](/api/overview).

## Token endpoint

```
POST https://platform.nemu.cc/api/oauth/token
```

Exchanges credentials for an access token. Send the body as
`application/x-www-form-urlencoded`. The client credentials can go in the body or in an HTTP
Basic header.

<ParamField body="grant_type" type="string" required>
  One of `authorization_code`, `refresh_token`, or `client_credentials`.
</ParamField>

<ParamField body="client_id" type="string" required>
  Your application `client_id`.
</ParamField>

<ParamField body="client_secret" type="string" required>
  Your application `client_secret`.
</ParamField>

<ParamField body="code" type="string">
  Required for `authorization_code`. The one time code from the redirect.
</ParamField>

<ParamField body="redirect_uri" type="string">
  Required for `authorization_code`. Must match the value used in the authorize request.
</ParamField>

<ParamField body="code_verifier" type="string">
  Required for `authorization_code`. The PKCE verifier that matches the challenge.
</ParamField>

<ParamField body="refresh_token" type="string">
  Required for `refresh_token`. The refresh token to rotate.
</ParamField>

<ResponseField name="access_token" type="string">
  The bearer token. Valid for one hour.
</ResponseField>

<ResponseField name="token_type" type="string">
  Always `Bearer`.
</ResponseField>

<ResponseField name="expires_in" type="integer">
  Seconds until the access token expires.
</ResponseField>

<ResponseField name="refresh_token" type="string">
  Present for `authorization_code` and `refresh_token`. Rotates on every use.
</ResponseField>

<ResponseField name="scope" type="string">
  The space separated scopes the token carries.
</ResponseField>

## Authorize endpoint

```
GET https://platform.nemu.cc/oauth/authorize
```

Starts the authorization code flow and shows the consent screen. See the
[authorization code flow](/oauth/authorization_code) for the full parameter list.

## Version endpoint

```
GET https://platform.nemu.cc/api/version
```

Public and needs no token. Returns the supported API versions. See
[versioning](/oauth/versioning).
