# Authentication

## How to authenticate

To authenticate your request, you will need to provide an authentication token with the required permissions. You can request an authentication token [through email](mailto:api@bankless.com).

After creating a token, you can authenticate your request by sending the token in the `X-BANKLESS-TOKEN` header of your request. For example, in the following request, replace `YOUR-TOKEN` with a reference to your token:

```
curl --request GET \
--url "https://api.bankless.com/endpoints \
--header "X-BANKLESS-TOKEN: YOUR-TOKEN"
```

### Validate your authentication

You can validate your token performing by visiting the authentication endpoint.

#### Example Request

```
curl --request GET \
--url "https://api.bankless.com/authentication \
--header "X-BANKLESS-TOKEN: YOUR-TOKEN"
```

This will result in the id of your token, as well as your current permission. Available permissions:

* CLAIMABLES
* QUESTS

#### Example Response

```
{
    clientId: "bankless",
    id: "fbcc076f-3b9a-4be3-9e84-4a63dc779829",
    permissions: [
        "CLAIMABLES"
    ]
    config: {
      max_requests_per_minute: 300
    }
}
```

### Rate Limits

A default rate limit of 300 calls per minute is enforced on a per key basis. On every authenticated request, the **x-ratelimit-remaining** header is returned. The header indicates how many requests you still have remaining for the minute.

```
x-ratelimit-remaining: 295
```


---

# 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.bankless.com/bankless-api/authentication.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.
