Loading…

SMS verification code login

```javascript WXAPI.loginMobileSmsCode({ mobile: '', code: '', autoReg: true, referrer: 123, postJsonString: '' }) ``` + mobile mobile phone number + code SMS verification code, ["Get SMS verification code"](https://www.yuque.com/apifm/nu0f75/pmoz4u) + If autoReg is true, it will automatically register when the user does not exist, otherwise it will directly return an error that the user does not exist. + postJsonString If the user does not exist, autoReg is true, and the json data of the user's extended attributes is saved when registering a new user (requires a string) + referrer If the user does not exist, autoReg is true, and the inviter information is saved when registering a new user. ```json { "code": 0, "data": { "uid": 1351478, "openid": "om3AQ0YaRp3RZtFuZ1Wgk0OdQjvA", "token": "83065b5e-9a75-4e64-8692-4f03eaa90348" }, "msg": "success" } ``` + uid After successful login, return the user number + token is the token returned after the user logs in. Many subsequent user-related operations require the token to be operated.