# Authorization

## **Get your API token**

Login to your account and navigate to your [profile](https://dashboard.naqrat.sa/my-profile) to generate a new API token. You can name your API token so you are aware of where the token is being used, this way you can recognize and delete it later when you do not need it anymore.

### **Authorize with API**

The token you have received (a very long string) can be used as a `bearer` token against our API.

```
Authorization: Bearer API_TOKEN_HERE
```

In this cURL example we demonstrate how to authenticate with our API:

```bash
$ curl <https://api.naqrat.sa/api/{event_name}> \\
    -H 'Authorization: Bearer n3h4bZK1bCbQ2EBpibvWykSzP7aJuuXeJz...' \\
    -H 'Accept: application/json' \\
    -H 'Content-Type: application/json'

```

> 💡 {event\_name} is name for event that you would send to us currently support these events:

* addtocart
* viewcontent
* checkout
* purchase


---

# 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://developers.naqrat.sa/authorization.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.
