# 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>
