Skip to content
OperadeDocs

Search documentation

Type to search documentation.

Documentation
Limited availability
Copy page
Open raw Markdown

Receive a Telegram webhook

Receive a Telegram update verified by the channel webhook secret header.

Endpoint

POST/api/v1/channels/telegram/webhook

Authentication

Operation classAuthenticationMinimum roleAPI key
provider-callbackTelegram webhook secret in X-Telegram-Bot-Api-Secret-Token.noneNot allowed

Parameters

NameInTypeRequiredDescription
x-telegram-bot-api-secret-tokenheaderstring or nullNo—

Request body

application/json request schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$object——NoYes——

Example

Provider payload contract

Telegram sends X-Telegram-Bot-Api-Secret-Token with the configured webhook secret; Operade verifies it before processing the update.

Provider payload JSON
{
  "message": {
    "chat": {
      "id": 300001,
      "type": "private"
    },
    "message_id": 200001,
    "text": "Hello"
  },
  "update_id": 100001
}

Responses

StatusDescriptionContent
4XXHandled client errorapplication/json: ErrorResponse
200Successful ResponseNo body
502Bad Gatewayapplication/json: ErrorResponse

4XX application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

502 application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the distributed error index to find each code's canonical domain page.

StatusCodeDescription
422validation_failedThe request did not pass field or business validation.
502channel_upstream_failedTelegram temporarily rejected an outbound channel action.
On this page
  1. Endpoint
  2. Authentication
  3. Parameters
  4. Request body
  5. application/json request schema
  6. Example
  7. Responses
  8. 4XX application/json response schema
  9. 502 application/json response schema
  10. Errors
  11. Related operations