> For the complete documentation index, see [llms.txt](https://developers.naqrat.sa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.naqrat.sa/authorization.md).

# 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
