Advanced API integrations
Please note that the term dialog state refers to the same thing as block, in the context of development tools.
API headers
Next to Query and Body parameters, Chatlayer.ai also supports API Headers in its POST, GET and DELETE requests. Headers can be added using the same combination of Key, Type and Value as the other parameters.
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252F0wuQNzJVK0079igDAAJn%252Fimage.png%3Falt%3Dmedia%26token%3Dfcf3af17-8c71-48f9-94b9-f1f69d3718b0&width=768&dpr=4&quality=100&sign=61f985dd&sv=1)
Make sure you include the correct content type in the header: content-type: application/json;
API error logs
In the History
menu, under Error logs
you can see an overview of all errors that occurred with the API's you have configured in the bot.
If you click on an error you can see additional request and response information about the event that triggered the error
API SSL settings
In the Settings
menu under the API
tab you can add encryption to the requests sent by Chatlayer.ai through the API plugin.
Click on + Setting
to add a new encryption setting. Fill in the required fields. You can choose between the SSL and HMAC encryption types.
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FlWaL6TyQPIA2Iks2Kxf2%252Fimage.png%3Falt%3Dmedia%26token%3D0599a75d-b67b-4bce-940f-6bd657efa200&width=768&dpr=4&quality=100&sign=88dcc60b&sv=1)
After creating the API security settings, you can use these settings in an API widget
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FWgJz6Sisp4KDGSpIGieL%252Fimage.png%3Falt%3Dmedia%26token%3Dd9753d19-cecb-40ac-9d9b-1d9a955e68f0&width=768&dpr=4&quality=100&sign=94b04759&sv=1)
Last updated