---
title: Statement Analysis - Authenticate
slug: api-marketplace/statement-analysis-authenticate
createdAt: 2024-06-06T06:26:03.754Z
---

## Introduction:

This API takes the username and password as input and provides the authToken in the response, that can be used for the bank statement analysis. This authToken will be valid for 24 hours from the time of creation.

## Sample Curl:

:::CodeblockTabs
preproduction

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/statementanalysis/authenticate' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth-token>' \
--data-raw '{
    "username": "john.kennedy@gmail.com",
    "password": "Sample@123#"
}
'
```

production

```curl
curl --location 'https://api.signzy.app/api/v3/statementanalysis/authenticate' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth-token>' \
--data-raw '{
    "username": "john.kennedy@gmail.com",
    "password": "Sample@123#"
}
'
```
:::

## Input Parameters:

| **Parameter** | **Type** | **Description**            | **Mandatory/Optional** |
| ------------- | -------- | -------------------------- | ---------------------- |
| username      | String   | Username of the Individual | Mandatory              |
| password      | String   | Password of the Individual | Mandatory              |

## Sample Response:

:::CodeblockTabs
sample response

```json
{
	"username": "john.kennedy@gmail.com",
	"authToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhYmhpc2hlay5taXNocmFAc2lnbnp5LmNvbSIsInJvbGVzIjpbIkFETUlOIl0sImNsaWVudCI6ImNISmxZMmx6WVY5MFpXNWhiblF5TXprMU9BPT0iLCJ0ZW5hbnRJZCI6IjIzOTU4IiwiYWNjZXNzIjoiZmFsc2UiLCJpYXQiOjE3MTc2NTUzNDAsImV4cCI6MTcxNzc0MTc0MH0.0GKVTDGmuIWi51qTqjsdSC78EswC8T8R9ni38zpXcgU"
}
```
:::

## Output Parameters:

| **Parameter** | **Type** | **Description**                                                 |
| ------------- | -------- | --------------------------------------------------------------- |
| username      | String   | The username used to create the authToken                       |
| authToken     | String   | Authentication Token Required to do the bank statement analysis |



## Status Codes:

:::CodeblockTabs
200 OK

```json
{
	"username": "john.kennedy@gmail.com",
	"authToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhYmhpc2hlay5taXNocmFAc2lnbnp5LmNvbSIsInJvbGVzIjpbIkFETUlOIl0sImNsaWVudCI6ImNISmxZMmx6WVY5MFpXNWhiblF5TXprMU9BPT0iLCJ0ZW5hbnRJZCI6IjIzOTU4IiwiYWNjZXNzIjoiZmFsc2UiLCJpYXQiOjE3MTc2NTUzNDAsImV4cCI6MTcxNzc0MTc0MH0.0GKVTDGmuIWi51qTqjsdSC78EswC8T8R9ni38zpXcgU"
}
```

400

```json
{
	"error": {
		"reason": "VALIDATION_ERROR",
		"status": 400,
		"message": "\"password\" is not allowed to be empty",
		"type": "Bad Request",
		"statusCode": 400,
		"name": "error"
	}
}
1. "\"password\" is not allowed to be empty"
2. "\"password\" is required"
3. "\"username\" is required"
4. "\"username\" is not allowed to be empty"
5. "Wrong password"
6. "Enter a valid email."
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

500

```json
{
    "error": {
        "name": "error",
        "message": "Internal Server Error",
        "status": 500,
        "reason": "ERROR",
        "type": "Internal Server Error",
        "statusCode": 500
    }
}
```
:::

