LI PASS Password Login
signIn API is used for players to log into LI PASS using an account and password.
Request parameters
| Parameters | Type | Description | Note |
|---|---|---|---|
| account | string | Account Email or phone number (phones currently not supported) | Required |
| account_type | number | Account Type 1: Email 2: Phone Number (currently unsupported) | Required |
| password | string | For further information, see Password Rules. | Required |
| phone_area_code | string | Phone Area Code | Required when account_type is 2 |
| machine_check_type | number | CAPTCHA Type 3: Tencent Captcha | Required when machine validation is enabled in Player Network |
| tencent_response | string | Tencent Captcha Return Value Needs to be converted to string, e.g., JSON.stringify({"appid":"xxx","ret":0, "ticket":"t030...ECE*","randstr":"@BHo"}). | Required when machine_check_type is 3 |
Request sample
accountApi.signIn(
{
account: 'xxx@gmail.com',
account_type: 1,
password: 'xxx',
}
).then((res) => {
console.log(res);
});
Response parameters
| Parameters | Type | Description |
|---|---|---|
| ret | number | Return code 0: Request successful !=0: Request failed, refer to msg for detailed results |
| msg | string | Result Explanation |
| token | string | User authorization token |
| uid | string | LI PASS UID |
| seq | string | Data Stream Message Serial Number |
| expire | int64 | Token Expiration Time Unix Time |
Response sample
{
expire: 1638490279
msg: "Success",
ret: 0,
seq: "1638190279-0180225865-002725-0000290492",
token: "xxx",
uid: "xxx",
}