Authorization Validator

Overview

The authorization validator allows ensuring that the customers' credentials are valid after they configure the integration.

When a user activates an integration for their Talkdesk® account, Talkdesk will request a POST to the configured endpoint with the user's information for the configured authorization fields.

The bridge must validate the credentials with the external service for the integration to be properly configured for the account.

Any field returned from the authorization validator will be stored on the Talkdesk’s side and used as authorization inputs for subsequent requests.

Request

POST https://example.com/auth

ReferenceTypeDescription
authHash•A hash of the authentication fields containing a user's credentials within the external service.
•The keys correspond to the fields requested by the integration when configuring it with Talkdesk.

Steps

1 - The auth fields contain user submitted values (and/or resulting from the OAuth 2.0 token exchange) for the fields the integration configured within Talkdesk. Utilize that information as the user authentication within the external service.

2 - Build a request to the external service to validate the given credentials. This can be a dummy request just to make sure the credentials are valid. It can also be a more elaborate validation through an authorization endpoint provided by the external service.

3 - The endpoint must return a 200 OK status code response if the request succeeds, and a 401 if otherwise. You can also send in the response (when 200 OK) any authorization parameters (since those parameters are expected by Talkdesk when the customer requests a custom integration). Talkdesk will store the parameters and resend the same key value for the other executions (retrieving contacts, agents, etc).

Sample Request

{
    "auth": {
        "username": "[email protected]",
        "password": "605b32dd"
    }
}

Response

POST https://example.com/auth

ReferenceTypeDescription
field•String.
•Integer.
•Boolean.
Any field that will be used as authorization parameters in subsequent requests

Sample Response

{
	“login_id”: 12,
	“token”: “123456789”
}

🚧

Troubleshooting

If you have questions or technical issues, please open a ticket using this form.