---
title: Login API
slug: vkyc/login-api
createdAt: 2024-08-21T08:22:21.574Z
---

### Introduction

To access this API, the customer must obtain valid credentials, which will be provided by the Signzy team upon request.

### Sample Request

Here <font color="#2166ae">**username**</font>, <font color="#2166ae">**password**</font> and <font color="#2166ae">**realm details**</font> will be shared by the Signzy to hit the Login API upon request by the client.

:::CodeblockTabs
Login API cURL - Preproduction

```javascript
curl --location 'https://go-preproduction.signzy.app/api/backopsusers/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "sample@gmail.com",
    "password": "sample@2024",
    "realm" : "ClientName_VCIP"
}'
```

Login API cURL- Production

```javascript
curl --location 'https://backops-go.onboardings.co/api/backopsusers/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "sample@gmail.com",
    "password": "sample@2024",
    "realm" : "ClientName_VCIP"
}'
```
:::

### Request Body Descripiton

| **Key**  | **Optional/Required** | **Description**                                       |
| -------- | --------------------- | ----------------------------------------------------- |
| username | Required              | Username on which the instance/realm has been created |
| password | Required              | Password to access the realm                          |
| realm    | Required              | Instance or realm created for individual clients      |

### Sample Response

The Login API authenticates the user and returns an <font color="#2166ae">**authorization token or id**</font>, which is required to access other APIs, such as the Create Merchant API.

:::CodeblockTabs
Response

```javascript
{
    "userId": "66912141da22feee809f5b7a",
    "applicationId": "669120cf134fd8dfe39c3b9a",
    "id": "ey*******4NTZ9.OF8Cb-IpUXikYKEgo8Qf-ukJF6P4xxxxxe4",
    "data": {
        "id": "66912141da22feee809f5b7a",
        "name": "Client_Name",
        "username": "sample@gmail.com",
        "email": "customeremail@signzy.com”,
        "realm": "ClientName_VCIP",
        "applicationId": "669120cf134fd8dfe39c3b9a",
        "profileSettings": {
            "timeZoneValue": "Asia/Kolkata",
            "dateFormat": "DD/MM/YYYY",
            "timeFormat": "HH:mm:ss"
        },
        "isCreatedBySiteAdmin": true,
        "createdAt": "2024-07-12T12:27:45.139Z",
        "updatedAt": "2024-07-12T12:27:45.139Z",
        "invalidLoginAttempt": 0,
        "invalidLoginAttemptSession": null,
        "lastLoginAt": 1721293973931,
        "passwordLastModifiedOn": 1720787412367,
        "lastLogoutAt": 1720802810520,
        "locals": {
            "attempts": 5
        },
        "grantData": {
            "title": "Admin",
            "level": 0,
            "grants": {}
        },
        "theme": {},
        "application": {
            "assignmentStrategy": "",
            "enableFieldCreateMerchant": "",
            "eyDemo": false,
            "strategyValues": [],
            "integrationTypeList": {}
        },
        "endUserUrl": "",
        "cookieStorage": false,
        "ekycFetch": false,
        "backopsLogoutRedirectUrl": false,
        "noForceChangePassword": false,
        "showDropOffBucket": false,
        "enableReporting": false,
        "analytics": false,
        "googleAnalyticsConfig": {
            "enabled": false
        },
        "realmProfileSettings": {
            "timeZoneValue": "Asia/Kolkata",
            "dateFormat": "DD/MM/YYYY",
            "timeFormat": "HH:mm:ss"
        }
    },
    "isManager": false
}

```
:::

### Response Body Description

| **Key** | **Value**                                         | **Description**                                                                                                                              |
| ------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| id      | ey\*\*\*4NTZ9.OF8Cb-IpUXikYKEgo8Qf-ukJF6P4xxxxxe4 | This is the authetication token or id which will be required to invoke other APIs like Create Merchant API and pull merchant API             |
| realm   | ClientName\_VCIP                                  | Realm will be set while creating the instance for the client and will remain constant. Multiple types of flows can be created in same realm. |

- The mapping other parameters in the response of Login API, apart from id and Realm can be ignored.&#x20;
- The default expiry of authentecation token or id is 14 days and can be configured as per the requirement.



:::hint{type="info"}
1. Name is mandatory field
2. Either of email or phone number is required.
:::

