# Authentication

To make our first request, we’ll need to get authenticated first.

We offer two different options for passing your API token. You are free to choose between the authentication methods. You can also use both of them at the same time. Please note that both methods count towards the same rate-limiting.

* **Authenticate using a query parameter**\
  You can pass your API token by passing 'api\_token' in your request parameters, like so:

```http
https://api.sportmonks.com/api/v3/motorsport/livescores?api_token=YOUR_TOKEN
```

* **Authenticate using a request header**\
  You can also pass your token via an 'Authorization' header, like so:

| Header        | Value               |
| ------------- | ------------------- |
| Authorization | *your\_token\_here* |

You can obtain and manage your API token in [**Mysportmonks.**](https://my.sportmonks.com/) The API token is only meant for your eyes and, as such, should be stored away safely. Our tokens have no expiration date and will remain valid until you manually delete them yourself.<br>

When making a request, a code response will always be returned. The following are all possible HTTP response codes for any request made to the API:

| Code                           | Description                                                                                                                                                                                                                                |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **200: OK**                    | Request succeeded                                                                                                                                                                                                                          |
| **400: Bad Request**           | It seems that some part of the request is malformed. The exact reason is returned in the response.                                                                                                                                         |
| **401: Unauthorized**          | The request is not authenticated.                                                                                                                                                                                                          |
| **403: Forbidden**             | Not authorized. Indicates you're attempting to access a feed that is not accessible from your plan.                                                                                                                                        |
| **429: Too Many Requests**     | Too many requests. In order to make the API as responsive as possible, you have an hourly request limit. The limit for your current subscription can be found in any successful response. Check the "meta" section to find out your limit. |
| **500: Internal Server Error** | An internal error has occurred and has been logged for further inspection. Please email support if you are receiving this error.                                                                                                           |


---

# 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.sportmonks.com/v3/motorsport-api/welcome/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.
