MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / InvalidToken

Class InvalidToken

src/telegram/error.py:113–125  ·  view source on GitHub ↗

Raised when the token is invalid. Args: message (:obj:`str`, optional): Any additional information about the exception. .. versionadded:: 20.0

Source from the content-addressed store, hash-verified

111
112
113class InvalidToken(TelegramError):
114 """Raised when the token is invalid.
115
116 Args:
117 message (:obj:`str`, optional): Any additional information about the exception.
118
119 .. versionadded:: 20.0
120 """
121
122 __slots__ = ()
123
124 def __init__(self, message: str | None = None) -> None:
125 super().__init__("Invalid token" if message is None else message)
126
127
128class EndPointNotFound(TelegramError):

Callers 5

__init__Method · 0.90
initializeMethod · 0.90
do_api_requestMethod · 0.90
_request_wrapperMethod · 0.90

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…