Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# InvalidCallbackData

class telegram.ext.InvalidCallbackData(callback_data=None)

  Bases: `telegram.error.TelegramError`

  Raised when the received callback data has been tampered with or deleted from cache.

  Examples

  Arbitrary Callback Data Bot

  See also

  Arbitrary callback_data

  New in version 13.6.

  Parameters:

    callback_data (`int`, optional) – The button data of which the callback data could not be found.

  callback_data

    Optional. The button data of which the callback data could not be found.

    Type:

      `int`

  __reduce__()

    Defines how to serialize the exception for pickle. See `object.__reduce__()` for more info.

    Returns:

      `tuple`