curl --request POST \
--url https://rt.tonapi.io/webhooks/{webhook_id}/subscribe-msg-opcode/{opcode} \
--header 'Authorization: Bearer <token>'{
"message": "unauthorized",
"status_code": 401
}Subscribe to messages with a specific opcode. When a new transaction happens with a message that contains the specified opcode, TONAPI sends a POST request to the webhook URL.
Warning: This subscription triggers webhooks for every message on the blockchain that contains the specified opcode, even if it’s unrelated to your accounts.
curl --request POST \
--url https://rt.tonapi.io/webhooks/{webhook_id}/subscribe-msg-opcode/{opcode} \
--header 'Authorization: Bearer <token>'{
"message": "unauthorized",
"status_code": 401
}API key from tonconsole.com. Can also be passed as a token query parameter.
Webhook identifier.
Opcode in hex format with 0x prefix.
Subscribed
Was this page helpful?