Customer credentials here refer to the access a customer of LHP or a similar application requires to authenticate a specific integration (since many of these integrations are being called on behalf of the customer and need to interact with their specific service).
Rather than each application needing to manage credentials on their own, the integration api offers services for credential management in order to make the process much easier
Method | URI | Headers |
---|---|---|
POST | /api/v1/credentials |
{"Authorization": "Bearer {access_token}"} |
{
"data[credentials]" : "object of key:value credentials to store",
"data[integration_key]" : "the integration key these credentials will pertain to",
}
{success} Success Response
200
{
"data": {
"type": "credential",
"id": "{credential_id}"
}
}
When created, the credentials passed are encrypted and stored. You will then want to store {credential_id} in your own application locally, tying it to the integration and related user. Going forward when making calls to this integration, you will simply need to pass credential: {credential_id}
and the integration api will find that stored credential, decrypt it, and send it to the integration you are interacting with.
If your application already has it's own means of storing customer credentials, or there is no need to store credentials for future use, an action that requires customer credentials can be called by passing credentials through the credentials_raw
property.
Method | URI | Headers |
---|---|---|
POST | /api/v1/integrations/example/leads |
{"Authorization": "Bearer {access_token}"} |
{
"credentials_raw" : {
"password": "secret"
},
"data" : {
"name": "Test",
"email": "test@test.com"
}
}
More information on storing credentials linked to a SSO user are located here: - Available Integrations - Data