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

# Authentication

> The access tokens v4 takes, and how to get one.

v4 takes access tokens from `accounts.plugchoice.com`, sent in the `Authorization` header:

```
Authorization: Bearer YOUR_ACCESS_TOKEN
```

Get one as [authentication](https://developer.plugchoice.com/guides/authentication.md) describes:

| You're building | Token |
| - | - |
| A script or tool for your own account | A personal API token with a client ID and secret, exchanged for an access token |
| An app or service other Plugchoice users sign in to | An access token from OAuth 2.0 at `accounts.plugchoice.com` |

Access tokens last a few minutes. Read how long from `expires_in` in the token response, and ask for a new one when it runs out or the API answers [`unauthenticated`](https://developer.plugchoice.com/api/errors/unauthenticated).

**Single tokens (old system)** work on v3 only.

## A client's own token

A token your OAuth client gets with the client credentials flow belongs to the client, not to a person. Endpoints about the person calling, such as [the user](https://developer.plugchoice.com/v4/api/get-user.md), answer it with [`unauthenticated`](https://developer.plugchoice.com/api/errors/unauthenticated). A personal API token acts for the person who made it, so it works there.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.