---
title: Get Auth Token
slug: v2/get-auth-token
description: Learn how to authenticate yourself and generate an access token for using Signzy's wide range of APIs. This comprehensive document presents a cURL request example with the necessary username and password parameters. Furthermore, it showcases a sample API 
createdAt: 2023-04-06T17:05:46.000Z
---

## Introduction

&#x20;This API allows a user to authenticate themselves and receive an access token which can be used to access various other APIs provided by Signzy.&#x20;

# Sample cURL

```curl
curl --request POST \
  --url https://signzy.tech/api/v2/patrons/login \
  --header 'Accept: */*' \
  --header 'Accept-Language: en-US,en;q=0.8' \
  --header 'content-type: application/json' \
  --data '{"username":"<username>","password":"<Password-or-apikey>"}'
```

| Parameter | Type   | Description                            |
| --------- | ------ | -------------------------------------- |
| username  | string | Username for authentication            |
| password  | string | Password or API key for authentication |

# Sample API REsponse

```javascript
{
    "id": "...accessToken...",
    "ttl": ..ttl..,
    "created": "..created..",
    "userId": "..patronId..."
  }
```

| Parameter Name | Data Type | Description                                |
| -------------- | --------- | ------------------------------------------ |
| id             | string    | Access token for the user session          |
| ttl            | number    | Time to live for the session               |
| created        | string    | Timestamp for when the session was created |
| userId         | string    | Patron ID of the logged in user            |

