---
title: Customer Login (Client Login)
slug: investor-onboarding-io/customer-login-client-login
description: Learn how to log in to the Signzy system using their API with this comprehensive document. It includes a sample request, JSON parameters, and insights into the expected output. Discover how to retrieve essential information like access token, time to live
createdAt: 2023-05-02T07:10:29.000Z
---

# Introduction

For using Signzy APIs you have to first log in to Signzy System which is a simple Rest API(HTTPS) call with JSON parameters as username and password. The following section mentions the data to be input, the expected output, and the meaning of fields in JSON.

### API Endpoint - Customer Login API

**Preproduction**: 

[https://backops-investor-onboarding-preproduction.signzy.tech/kra-handler/api/customers/login](https://backops-investor-onboarding-preproduction.signzy.tech/kra-handler/api/customers/login)

**Production**:

[https://backops-investor-onboarding.signzy.tech/kra-handler/api/customers/login](https://backops-investor-onboarding.signzy.tech/kra-handler/api/customers/login)

# Sample Request

::::Tabs
:::Tab{title="Preproduction"}
```curl
  curl --location 'https://backops-investor-onboarding-preproduction.signzy.tech/kra-handler/api/customers/login' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
    "username": "..username..",
    "password": "..password@123.."
}'
```
:::
::::

## Request Field Description

| **Key**      | **Data Type** | **Required/Optional** | **Description**                                                                |
| ------------ | ------------- | --------------------- | ------------------------------------------------------------------------------ |
| **Header**   |               |                       |                                                                                |
| Content-Type | String        | Required              | application/json                                                               |
| **Body**     |               |                       |                                                                                |
| username     | String        | Required              | Username of the created customer                                               |
| password     | String        | Required              | The corresponding password of the username is to be used for successful login. |

# Sample Responses

A successful API request generates an HTTP 200 response. The response to a request where the output format was specified as JSON, is a JSON array with a response status. To get the authentication token, look at the following response having the parameter “id”. The userId is the Customer ID.

:::CodeblockTabs
200:

```json
{
"id": "JGzqxxxxxxT2i8S",
"ttl": 1209600,
"created": "2023-03-02T15:21:31.457Z",
"userId": "5exxxxxxxxaa" 
}
```

400

```none
Bad syntax error:
{
    "error": {
        "statusCode": 400,
        "name": "SyntaxError",
        "message": "Unexpected string in JSON at position 31"
    }
}
```

401

```none
{
    "error": {
        "statusCode": 401,
        "name": "Error",
        "message": "login failed",
        "code": "LOGIN_FAILED"
    }
}
```

404

```none
{
    "error": {
        "statusCode": 404,
        "name": "Error",
        "message": "There is no method to handle POST /login"
    }
}
```

502

```typescript
<html>

<head>

    <title>502 Bad Gateway</title>

</head>

<body>

    <center>

        <h1>502 Bad Gateway</h1>

    </center>

</body>

</html>

```
:::

## Response Field Description

| **Key** | **Data type** | **Description**                                                                                                          |
| ------- | ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| id      | String        | This is your access token to be passed into other endpoints as an Authorization header                                   |
| ttl     | String        | \*\*Time to live\*\*for your token, which means for how much time this token will be valid from the time of the creation |
| created | String        | Time and date of creation of the application                                                                             |
| userId  | String        | The ID of the user                                                                                                       |

:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

