LeadSquared Developer Centre

ON THIS PAGE

Authentication


API Keys

Every API call requires you to pass the accessKey and secretKey associated with your account. There are 2 ways in which you can pass these values –

  1. In the API URL (query string)
    • For example, https://{host}/v2/LeadManagement.svc/Lead.Capture?accessKey=AccessKey&secretKey=SecretKey
  2. As API headers as follows
    • x-LSQ-AccessKey – <AccessKey>
    • x-LSQ-SecretKey – <SecretKey>

For better security, we recommend you use method 2., and pass the keys as headers.

Any action performed using APIs uses the credentials of the user whose keys are passed.
These keys are unique for every user and carry many privileges, so be sure to keep them secret! Don’t share your secret API keys in publicly accessible areas or in any client-side code.
All API requests must be made over HTTPS. Calls made using plain HTTP will fail.

The accessKey and secretKey can be obtained from the My Account>Settings>API and Webhooks section –

Show Secret Key

Note:

  • Ideally, you should use the accessKey and secretKey of an Admin user so you don’t face any restrictions associated with other user roles like Marketing Users or Sales User.
  • Make sure that you use the API keys of an active user. If a user leaves your organization and you deactivate the user, the API keys are also deactivated and API calls with those keys will fail.
  • If your keys are incorrect, then you’ll receive a “401 Unauthorized” response.

 

What’s Next?

To help you quickly test the APIs and integrate we’ve written some sample code.

On this page

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