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

# token/create

All API calls require authentication. To obtain an authentication token you will require a username, password and your security key (this was emailed to you).

## token/create

<mark style="color:green;">`POST`</mark> `https://auth.powerpointgeneratorapi.com/v1.0/token/create`

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | string | multipart/form-data |

#### Request Body

| Name                                       | Type   | Description                         |
| ------------------------------------------ | ------ | ----------------------------------- |
| username<mark style="color:red;">\*</mark> | string | Your account username/email address |
| password<mark style="color:red;">\*</mark> | string | Your account password               |
| key<mark style="color:red;">\*</mark>      | string | Your security key                   |

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

```
Success!
```

{% endtab %}

{% tab title="404" %}

```
Could not find
```

{% endtab %}
{% endtabs %}

### Example request

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

```bash
curl -d "username=<your_username>&password=<your_password>&key=<your_security_key>" \
     -X POST https://auth.powerpointgeneratorapi.com/v1.0/token/create
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://auth.powerpointgeneratorapi.com/v1.0/token/create"
payload={'username': '<your_username>', 'password': '<your_password>', 'key': '<your_security_key>'}
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
var formdata = new FormData();
formdata.append("username", "<your_username>");
formdata.append("password", "<your_password>");
formdata.append("key", "<your_security_key>");

var requestOptions = {
  method: 'POST',
  body: formdata,
  redirect: 'follow'
};

fetch("https://auth.powerpointgeneratorapi.com/v1.0/token/create", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="Postman" %}

1. Post: <https://auth.powerpointgeneratorapi.com/v1.0/token/create>
2. Select `form-data` in the `Body` tab
3. Populate the `KEY` and `VALUE` with your username, password and key
4. Hit `Send` to get your Bearer Token&#x20;

<figure><img src="/files/8GdsWjwWv6XZ4kSxj4G4" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
