---
sourceType: official-guide
sourceTypeMatchedRule: fallback
slug: MA/eKYC/apis/generateSessionID
title: Generate Session ID
---
API to generate a new session.

### Request

- Endpoint: `/v1/api/ekyc-verify/session`
- Method: POST
- Header

  | Name    | Type   | Required | Description                                                                                                                              |
  | ------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
  | api_key | string | yes      | The API key associated with your account to authenticate requests (for development, check the [Credentials](/docs/MA/eKYC/credentials) section). |

- Parameters

  | Name                   | Type    | Required | Description                     | Default |
  | ---------------------- | ------- | -------- | ------------------------------- | ------- |
  | enable_id_doc_fraud    | boolean | no       | Enable ID doc fraud checking    | true    |
  | enable_selfie_liveness | boolean | no       | Enable selfie liveness checking | true    |
  | only_face_matching     | boolean | no       | Only use face matching feature  | false   |

- Body

  - Type: _application/json_
  - Data:

    | Name         | Type | Required | Description                                                                                                                                                                                                                                        |
    | ------------ | ---- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | consent_info | json | yes      | Consent information from user. It includes: • uid (string): User Identifier • timestamp (int - unix timestamp in milliseconds): Specific time when user accepts consent • ip (string): IP address of user device |

### Response

- Status: `200 OK`
- Body: JSON

  ```json
  {
    "code": 0,
    "message": "Successful",
    "data": "<ENCRYPTED_DATA_IN_BASE64>"
  }
  ```

  - Field “data”: Decrypt the “data” field as described in the [Decrypt response data](/docs/MA/eKYC/encryption#decrypt-response-data) section to get the JSON object with following fields.

    | Name       | Type   | Description                                            |
    | ---------- | ------ | ------------------------------------------------------ |
    | session_id | string | Newly generated session ID, expired in **30 minutes**. |
