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

You are seeing the documentation for version 1, but the last version for this package is v1. Click here to go to the last version.

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 29 May 2026