Skip to main content
POST
Auth Telegram Widget

Body

application/json

Request for Telegram Login Widget authentication.

id
integer
required

Telegram user ID

first_name
string
required

User's first name

Maximum string length: 64
auth_date
integer
required

Unix timestamp of authentication

hash
string
required

Authentication hash

Required string length: 64
last_name
string | null

User's last name

Maximum string length: 64
username
string | null

User's username

Maximum string length: 32
photo_url
string | null

User's photo URL

Maximum string length: 512
campaign_slug
string | null

Campaign slug from web link

Required string length: 1 - 64
Pattern: ^[a-zA-Z0-9_-]+$
referral_code
string | null

Referral code of inviter

Maximum string length: 32
Pattern: ^[a-zA-Z0-9_-]+$

Response

Successful Response

Full authentication response with tokens and user.

access_token
string
required
refresh_token
string
required
expires_in
integer
required
user
UserResponse · object
required

User data response.

token_type
string
default:bearer
campaign_bonus
CampaignBonusInfo · object | null

Info about campaign bonus applied during auth.