Profile

Get user profile

Changed on

Returns detailed user profile information including balances, statistics, and program levels.

get/v1/profile/

Request

  • Base URL
    https://api.getmytg.com
  • URL
    https://api.getmytg.com/v1/profile/
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Response

Response for status 200

idstring required

User Database ID

telegram_idstring nullable required

User's Telegram ID (null for web-only users)

telegram_usernamestring nullable required

User's Telegram username

loginstring nullable required

Web username

language'ru' | 'uk' | 'en' | 'es' | 'zh' nullable required

Preferred user interface language; null until the user selects one

created_atstring required

Account creation time in ISO 8601 format (UTC)

Example response

{
  "telegram_id": "123456789",
  "telegram_username": "username",
  "login": "username",
  "language": "en",
  "balance": {
    "amount": "1.50",
    "currency_code": "USD"
  },
  "statistics": {
    "total_purchases": 42
  },
  "discount": {
    "level": "silver",
    "percent": 5
  },
  "created_at": "2024-06-01T12:00:00.000Z"
}

Changes

    • breaking

      removed the required property from the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the required property to the response with the status