Sign in with Telegram callback
GET/api/v1/auth/telegram/callback
Telegram returns the login result in the URL fragment
(#tgAuthResult=…), which never reaches the server. Called with only
state, this endpoint answers a small HTML page (CSP allows its one
script by hash) that re-requests it with tgAuthResult in the query
string. The Login Widget's plain form (id, auth_date, hash, …
as query parameters) is accepted too.
The result's hash must verify (HMAC-SHA256 of the sorted
key=value lines, keyed by SHA-256 of the bot token) and auth_date
must be at most 5 minutes old. The Telegram account must already be a
verified telegram notification contact of a SolidPing user: no
account is ever created (Telegram returns no email address). Success
redirects to /d/auth/complete?code=… like every other provider and
records auth.login_succeeded with auth_method telegram.
Failures redirect with error set to TELEGRAM_NOT_LINKED,
TELEGRAM_AMBIGUOUS (linked by several users and no org picks
one), TELEGRAM_AUTH_EXPIRED, TELEGRAM_AUTH_INVALID,
INVALID_STATE or access_denied.
Request
Responses
- 200
- 302
Bridge page that moves the fragment into the query string
Redirect to the session handoff, or back with error / error_description