channelHooks.receiveChannelEvent
POST
/v1/hooks/channels/{channelId}
const url = 'https://example.com/v1/hooks/channels/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '"example"'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/hooks/channels/example \ --header 'Content-Type: application/json' \ --data '"example"'Takes an event from Slack, Lark, Telegram or a custom Channel. OpenBot checks the signature, answers at once, and does the work later. A custom Channel sends a CustomEvent with X-OpenBot-Timestamp and X-OpenBot-Signature: sha256=<hex HMAC-SHA256 of timestamp + "." + body>.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”channelId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Example generated
exampleResponses
Section titled “Responses”Success
Media typeapplication/json
Example generated
exampleChannelHookDenied
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "ChannelHookDenied"}ChannelsUnavailable | RequestFailed