LeadSquared Developer Centre

ON THIS PAGE

Sign In with Password

This downloads our complete API collection, including all endpoints—not just this specific endpoint.
Run in Postman

This API signs-in a registered user. Once signed in, the user will have access to the custom functionality developed within your portal (for example, loan/education application forms, progress tracking, contact information, etc.).

  • You can sign in the user by passing the EmailAddress and Password in the JSON body, as shown in the sample request.
  • Alternatively, you can sign in using Password and any other unique lead identifier configured in your account using the SearchKeyData property as follows –
{
  "Password":"examplepassword",
  "SearchKeyData":{
    "SchemaName":"mx_PAN_Number",
    "Value":"SSKKPPYY222"
  }
}

API Headers

Pass the following mandatory headers:

  1. The public authentication key you receive from the Get Public Auth Key API response.
    • For example,  Authorization = <Your Auth Key>
  2. The registration token you received Get Portal Registration Token API response.
    • For example, x-lsq-registertoken = <registration token>
  3.  The portal Id. This specifies which portal to register the user on.
    • For example, x-lsq-portalid = <portal id>

The response will return the LeadId and an AuthKey. The AuthKey is a Private Authentication Key used to authenticate the session after a user has signed in to the portal. It is valid for 4 hours. You will have to pass this key in the API header while calling the Change Password API.

Here’s an example of a customized sign-in webpage. Clicking the ‘Sign In’ button triggers the API call.

sign in api

Note: You must use the correct API host to make successful calls.

API URL

URL
Icon
POST https://{host}/api/Authentication/v2/Signin?

Request

Content-Type: application/json
JSON Body/Payload Icon
{
  "EmailAddress": "johnwick@example.com",
  "Password": "Samplepassword@123"
}

Request Parameters

Parameter Description
EmailAddress

Pass the user’s registered email address.

Password

Pass the registered password here.

Response

200 OK
Content-Type: application/json
{
  "AuthKey": "TWNVSjFqVTdFRkkyYjlJMjk0ZTl4bEUzSkVmWjZadGtsQVYxWndvOHh1TGFrM0l6QThqTmtIWUcrQUkxVjhrUmFtYlZRY0JGM1g2VnJxYXZTVXpEKzF6a09XdEtBUnBnOVRXcUwvMVlzWnZ6VTBQdE5TMmFTMmhycmVRNTQ4TG0zK1prRW1ZUEVuM2VRbm4yN0h2YzN4ZTgyblcrZkwyakV2NEIzRm1ldjY0WTdCRHV3eU5VK1Q0bHBxME9oaDhuRzBHM09jdERneERIemJZQjB5RHRCdjBBRENhZW9ibi9wU2thWXhuYWZLU2JVWXlxajRpN2JQN2Rid0pNWnRXUDlWbjE0VEFJUnFjcnRLY0l5bWFPMWUvMzZ1TXR1RVY3Q3UxVjN3NFFvTDBNRDJYRXU5alVBejhQckZnRGVMUUtUM1pBeGZpZUlzK3A4b3ZHaTdabXdWUWpwUnNJSWNwSkRpTlkzREJVQ080ZWZmS2FLVEdpY3E0NU5TUW5CMHJxbTBDZHJIRGNSRDBvbmtjbVBMcXpHKzNxcUk0TFpXSlB2WGd4VVZnV0R2NzgrTm5ZVUN5b3VTMGJUK2RWTmYyNUF6UGxMTjFVTkp6QVpaTm5BRndINEc3R1Z5bE1RbWRtRnp1bEJmSFJBUmZXYjJXTmVIMkZmR0EwUTBuOE95eGZUcSt3L3NucjN4Z2tvcStLbnVQYXFUTVk3aVZ1NXZ2TlFGa3A3cGM1czYyeDB0ZFVBL1N2OE04TWRVSnFzd0hTTTNIL0tlUDdhbHA4R2NxM0ZQaVl2UysvVVVhbWhBVkNhNkVIWjBtdnVaST0=",
  "LeadId": "a822e018-80a4-4a86-bd9d-9855710109ff"
}

HTTP Response Codes

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.

On this page

© 2024 by MarketXpander Services Pvt Ltd. All Rights Reserved.