DEF STUDIO srl

Need help with Laravel and web development?

Hire one of our experts for your projects.

We build tailored products, websites and platforms — with care for UX, performance and maintainability.

Booking open for Q4 — limited slots

Retrieve Callback Data

Callback query data must be defined with the following structure:

action:action_name;key1:foo;key2:bar

and will be handled by a public action_name method inside a custom webhook handler.

Telegraph implements some useful methods to interact with the received callback query:

Data can be retrieved from the payload using ->get() method:

class CustomWebhookHandler extends WebhookHandler
{
    public function dismiss(){
        //...

        $key1 = $this->data->get('key1'); //foo

        $key3 = $this->data->get('key1', 'default value'); //default value
    }
}
Suggest a change
Last updated 22 September 2025