Headers
Chats API authorization differs from the authorization used in other Kommo API methods. In order to work with Chats API, you do not need to pass an Access Token, but you must include the following headers in all requests to amojo.kommo.com
:
Date
Content-Type
Content-MD5
X-Signature
Header | Description |
---|---|
| Date and time of the request generation, the signature will be valid for 15 minutes from the date of the request generation. |
| Request data type, currently only |
| For the request body, you need to calculate the |
| Request signature. A string is formed from the method name (GET/POST) in uppercase and the values (as specified in the request without changes) of the headers by combining them via |
It's important not to use a secret key in the frontend of the widget. Any requests using the secret key should only be made from the backend part of your application.
Formation of signatures and headers
As mentioned earlier, all requests must have a number of headers, including X-Signature
, the value of which is the SHA1 hash of the request body, signed with a secret key.Using a secret key allows you to check the integrity of the useful data and its origin.
You can check out the recipe for counting your Chats API headers in Python and PHP here: