# Token Endpoint

Guide to using the token endpoint for authentication in the Font Awesome GraphQL API.

> Generate an access token to get access to authorized fields.

An access token is required to access authorized fields on the schema. The `/token` endpoint is used to resolve an API Token into an access token. An access token can be used for any number of requests, until it expires.

1. Grab your API Token from your [account](https://fontawesome.com/account#api-tokens) page.
2. Suppose your API Token is: `D3C4F-C0FF33-ADD-C0C0A`. You would use your API Token to request a fresh access token like this:

```bash
curl -H "Authorization: Bearer D3C4F-C0FF33-ADD-C0C0A" \
-X POST \
https://api.fontawesome.com/token
```

```json
{
  "access_token": "123.abc.456def",
  "expires_in": 3600,
  "scopes": ["public", "kits_read"],
  "token_type": "Bearer"
}
```

- `access_token`: the value of the access token to use in the `Authorization` header of subsequent query requests
- `expires_in`: number of seconds until this access token expires
- `scopes`: the list of [authorization scopes](/apis/graphql/auth.md) granted by this access token
- `token_type`: token type which would appear before the access token in the `Authorization` header, followed by a space, like this:

```bash
curl -H "Authorization: Bearer 123.abc.456def" ...
```
