# Requesting Custom Fields on your JWT Token

### Use Case <a href="#use-case" id="use-case"></a>

Let's say you have a user with attributes:

```javascript
{    
    "username": "helloworld",    
    "role": "admin"
}
```

And you want to include this in Cotter's Access Token so that you can quickly access them in your API Middleware, you can now do this by calling an API request.

### &#x20;The API <a href="#request-custom-claims-on-cotters-access-token" id="request-custom-claims-on-cotters-access-token"></a>

To do this, checkout the API reference at

{% content-ref url="/pages/-MGMZEOXjRRPxy1zAe-9" %}
[Requesting Custom Claims on your Access Token](/api-reference/oauth-tokens-api/requesting-custom-claims-on-your-access-token.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cotter.app/getting-access-token/requesting-custom-fields-on-your-jwt-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
