x-user-key
header yourself. Check out the Authentication section for more information.
https://chat.botpress.cloud/$YOUR_WEBHOOK_ID/hello
.
{ "type": "text", "text": "hello bot" }
.x-user-key
header. There are two ways to get this user key:
createUser
operation and get the key in the response’s body. This operation is the only one that is not authenticated.x-user-key
header is a JWT. Here’s how to sign it using the jsonwebtoken NodeJS library:
x-user-key
JWT header. If the signature is invalid, the request will be rejected with an unauthorized status code.
By manually signing your requests, you ensure that nobody except you can chat with your bot over the Chat API.