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

# Access token

To retrieve your access token you can simply run the following `API call` with your **System scope** password. In case you want to retrieve your **Event scope** token, you must include the `eventID` query attribute and use your **Event scope** password.

{% tabs %}
{% tab title="cURL" %}

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=person.signIn&username=YOUR_USERNAME_HERE' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data password=YOUR_PASSWORD_HERE
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.inevent.com/?action=person.signIn&username=YOUR_USERNAME_HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "password=YOUR_PASSWORD_HERE",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Content-Type: application/x-www-form-urlencoded"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
var axios = require("axios").default;

var options = {
  method: 'POST',
  url: 'https://api.inevent.com/',
  params: {
    action: 'person.signIn',
    username: 'YOUR_USERNAME_HERE'
  },
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  data: {
    password: 'YOUR_PASSWORD_HERE'
  }
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.inevent.com/"

querystring = {"action":"person.signIn","username":"YOUR_USERNAME_HERE"}

payload = "password=YOUR_PASSWORD_HERE"
headers = {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
```

{% endtab %}
{% endtabs %}

Here is an example of response you will get if successful:

```json
{
  "count": 1,
  "data": [
    {
      "personID": "1",
      "firstName": "Mauricio",
      "lastName": "Giordano",
      "name": "Mauricio Giordano",
      "username": "giordano@inevent.com",
      "email": "giordano@inevent.com",
      "image": "",
      "timezone": "",
      "telephone": "",
      "facebookID": "",
      "linkedInID": "",
      "twitterID": "",
      "date": "1593719050",
      "tokenID": "YOUR_TOKEN_HERE",
      "scope": "system",
      "targetID": "0"
    }
  ]
}
```

The `tokenID` value will be accessible through the following path: `response["data"][0]["tokenID"]`.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developers.inevent.com/authentication/access-token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
