Create WhatsApp Callback Profiles using Dynamic Variables

You can create WhatsApp callback profile for receiving several possible WhatsApp status updates to any of your endpoint(s) from the Kaleyra platform.

For example, you can configure your callback profile to receive updates about message status, incoming message, message template status, payment status, and phone number quality update. While creating a callback profile for the WhatsApp channel, the Kaleyra platform provides a list of WhatsApp related events you can chose to receive updates for and for each events, the kaleyra platform provides a list of attributes you can receive as part of the updates. Such attributes, called “dynamic variables" can be selected as you like so to match the set of information you are interested in. The "dynamic variables" list serves as a ‘ready reckoner’ to add the callback variables without having to know the variable names. Whenever Kaleyra platform receive an update from Meta matching the events you have configured in your callaback profile, the value for the “dynamic variable” configured is fetched and sent to your endpoint.

For more information on how to use a callback profile in WhatsApp, see WhatsApp API V2 Configuration for Callback.

To create a callback profile for receiving updates about WhatsApp events, perform the following steps:

  1. Sign in to your Kaleyra account.
  1. Navigate to the profile settings drop-down list and select the Callback Profiles option. The Callback Profiles page appears.
  1. On the Callback Profiles page, click Add New. The Add Callback Profile pane appears on the right side of the page.
  1. Perform the following steps to add all the relevant information in the ‘Add callback profile’ page:
    1. In the Title field, enter a name for the callback profile you are creating. This is a mandatory field.

    2. From the Select Channel API list, select the option "whatsapp - WhatsApp Callbacks" to create a callback profile to be used to receive back updated information about the WhatsApp events.

    3. After you select the option whatsapp - WhatsApp Callbacks’ in the previous step, the List of Events for the selected channel automatically appears.

    4. By default, all the events are selected. If you wish to deselect all, click the Deselect All. To deselect an individual event, click the check-box corresponding to the available options. You have the following options:

      • message_status - to get the WhatsApp callback for message status. For example, sent, delivered, read, and many more statuses.
      • incoming-message - to get the WhatsApp callback for incoming message carrying the actual text or media sent by the end-user to you.
      • payment_status - to get the WhatsApp callback for payment status.
      • message_template_status_update - to get the WhatsApp callback for message template status update.
      • phone_number_quality_update - to get the WhatsApp callback for phone number quality update.
    5. Click X (CLOSE) to close the List of Events pane.

    6. In the HTTP Method field, select a method for which the callback is created. The options listed are POST, GET, PUT, and DELETE. Only POST and GET methods are supported for the WhatsApp channel. Based on your selection for Method type, the relevant fields appear. For the POST method, you need to copy the dynamic variable and paste it in the Request Body (mentioned in this procedure). For the GET method, you need to copy the dynamic variable and paste it in next to the provided endpoint following instruction from the step number vii.

    7. In the Enter Endpoint field, enter the URL at which the callback information should be sent by Kaleyra platform.

    8. In the Dynamic Variables field, click View to view and select the dynamic variables for the selected events. The dynamic variables represent all the possible information that you can retrieve about the selected events as part of the callback. You may select all of them, or only the ones you are interested in. The List Dynamic Variables list appears.

    9. To select all the dynamic variables, click Select All or manually select the dynamic variables check-boxes that you want to receive in the callback sent from Kaleyra to your system.

    10. After selecting the variables, click Copy to Clipboard.

    11. Click ‘X’ (CLOSE) on the window to close the window.

    12. Using the mouse, right-click and paste the dynamic variables either in the Request Body field (POST method) or at the end of the Endpoint URL as query parameters (GET method).

    13. From the Retry drop-down, select the number of retries that Kaleyra Platform will perform in case the first callback receive a failure response or no response from your endpoint. You have the option for 0, 1, and 2. For assistance with more than two retry attempts, you can contact the Support team.

    14. To enable form data or urlencoded and enter the headers details manually, toggle the Enable form data or urlencoded headers button. In the Headers field, enter the key-value pair values to add additional information to be added to the HTTPS request generated from Kaleyra to your system, for example, authentication details. Use the +Add more button to add multiple Header fields. For information on basic authentication, see Basic authentication.

    15. To enable encryption of the callback information, toggle the Enable Encryption button. The Algorithm, Key, Initialization Vector, and Parameters fields appear.

    16. Enter values in these fields. To know more about these fields, see Callback Encryption.

    17. The Enable Callback Required Options is required only if you are using chatbot or IE. To enable the Response message field and enter a text as the callback response message, toggle the Enable Callback Required Options button.

    18. To enable the advanced authentication for WhatsApp callback, toggle the Advanced Authentication button. The Advanced Authentication fields appear.

    19. Enter the details. For more information on advanced authentication fields, see Callback Advanced Authentication.

  2. Click Save. The confirmation message Callback Profile has been created successfully appears and the added callback appears in the Callback Profiles page.





© 2025 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.