Endpoint validation
A prerequisite for using Push API is the validation of your endpoint URL. You must implement a webhook request handler of the “echo” type for this.
To validate your endpoint URL, the System will send an "echo" type request, with the “echo_data” parameter containing some short pseudo-random text. The size of the text will not exceed 50 characters. The text can include Latin letters, Arabic numbers, and the special character “:”.
In the response, the System will expect to receive a response of the “echo” type, with the “echo_data” parameter, the content of which is identical to what was in the request. You can simply copy the request body into your response, without any additional operations.
You can see examples of HTTP requests and responses (Listing 2.1, 2.2).
Listing 2.1 – Example of webhook HTTP request
Listing 2.2 – Example of HTTP response
The implementation of this handler is required for working with the Push API.
Validation of the endpoint URL is carried out when it is created on the platform, and may also be repeated periodically during its use.
If you do not have the opportunity to implement a handler for the "echo" webhook payload, you can use the manual endpoint URL validation feature. This action is extremely undesirable and is permissible only in special cases!
If you use the manual validation feature, your endpoint URL will continue to be marked as "Invalid", but webhooks will still try to be sent to it. You also assume responsibility for any incorrect URL links. We reserve the right to block invalid URLs
Last updated