SignIn
The signIn
API is used for a player to log in to LI PASS through their account and password.
Request Parameter
Parameter | Type | Description | Remark |
---|---|---|---|
account | string | Account Email or phone number (currently not supported) | Required |
account_type | number | Account type 1: Email 2: Phone number (currently not supported) | Required |
password | string | Password. For more 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 CAPTCHA is configured on Player Network |
tencent_response | string | Tencent Captcha response value Converts the value to string, for example, 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 Parameter
Parameter | Type | Description |
---|---|---|
ret | number | Return code 0: Request success, parse related returned field information. !=0: Request failure, check msg for the detailed return message. |
msg | string | Return message |
token | string | Player Network SDK user authorization token |
uid | string | LI PASS UID |
seq | string | Sequence number of the message in the data stream |
expire | int64 | Expiration time of the token Unix time |
Response Sample
{
expire: 1638490279
msg: "Success",
ret: 0,
seq: "1638190279-0180225865-002725-0000290492",
token: "xxx",
uid: "xxx",
}