```javascript
WXAPI.tgBotAuthorize({
initData: ''
})
```
+ initData is the authorization data read by the front end, `tg.initData` (original string) is passed to the back end, do not pass initDataUnsafe! This is parsed by the front end, can be tampered with, and cannot be trusted.
+ postJsonString user’s extended data, must be a string in json format
+ referrer user ID of the inviter
```json
{
"code": 0,
"msg": "success",
"data": {
"uid": 111589485,
"token": "5e092b5d-de4f-4420-a6d8-d9179f0b3a27",
"tgUserInfo": {
"id": 9216534514,
"first_name": "fuzhiling",
"last_name": "",
"username": "fuzhiling",
"language_code": "zh-hans",
"allows_write_to_pm": true,
"photo_url": "https://t.me/i/userpic/320/wqABAJNfYhGRCT4okZH0xJTn_JQ94krHHLIf8Bd7V6EITJEphvqu5LwO-uJXR-bj.svg"
}
}
}
```
+ uid user ID
+ token login credentials
+ tgUserInfo TG user information