auth

Auth via telegram

Changed on

The token is recorded in the database and in the user's cookies. If the user logs in under different browsers, then each authorization will have its own token.

post/api/v1/auth/tg

Request

  • Base URL
    http://localhost:8888
  • Auth
    none declared

Request body

idinteger required
first_namestring
last_namestring
photo_urlstring
usernamestring
hashstring required
auth_dateinteger required
referral_idstring

Example request

{
  "id": 1261871881,
  "first_name": "Test",
  "last_name": "Test",
  "photo_url": "https://test_image.png",
  "username": "test",
  "hash": "cd0e201bf7328535343301f428e51f01084a3e2a3822f4843d86b540bbebfe15",
  "auth_date": 1678275313,
  "referral_id": "ref_test"
}

Response

Ok

okboolean required

Example response

{
  "ok": true
}

Changes