---
title: "Authenticating via API with an Access Token"
slug: "how-to-authenticate-to-panaya-via-api-with-an-access-token"
updated: 2023-12-21T14:18:28Z
published: 2023-12-21T14:18:28Z
canonical: "success.panaya.com/how-to-authenticate-to-panaya-via-api-with-an-access-token"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://success.panaya.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticating via API with an Access Token

To login to Panaya via API-

1. [Create your **access token**](https://success.panaya.com/docs/how-to-create-your-token) - Select this option if the token should have an expiry date. Login API calls are required to authenticate with this type of token.
2. Use the below HTTP call to complete the authentication and receive a **response token.**  
  
**POST**  
Panaya URL - https://**my**.panaya.com/api/accesstoken or https://**emea**.panaya.com/api/accesstoken  
  
For the following tabs -

- **Authorization**  
none
- **Header**  
{"Content-Type":"application/x-www-form-urlencoded"}
- **Tests**  
var jsonData = JSON.parse(responseBody);  
postman.setEnvironmentVariable("token", jsonData.token);  
![](https://cdn.document360.io/f404076c-de23-4609-848e-2dfd4ef701b0/Images/Documentation/image-1638893850473.png)

| **Key** | **Value** |
| --- | --- |
| username | {your Panaya login email} |
| token | {your Panaya token} |

![](https://cdn.document360.io/f404076c-de23-4609-848e-2dfd4ef701b0/Images/Documentation/image-1638893866021.png)  
After clicking **Post**, you should then receive a unique session token.  
  
You should also be able to **view the token** assigned to the variable (as defined in [Step 2 - Postman Setup](/v1/docs/step-by-step-guide-to-panaya-apis)) by clicking on  
![](https://cdn.document360.io/f404076c-de23-4609-848e-2dfd4ef701b0/Images/Documentation/image-1638893883941.png)the**Environment quick look icon**.

**Good to know!** The **response token** is valid for 1 hour and used for all API calls

The username is case sensitive, it must be set the same way it is maintained in Panaya User Management.

## Related

- [Monitoring and Disabling User Tokens (as administrator)](/how-to-monitor-and-disable-user-tokens-as-administrator.md)
- [Generating Tokens](/how-to-create-your-token.md)
