requestSMSCode static method
Requests an SMS code for operation verification.
Implementation
static Future requestSMSCode(String mobile,
{String? template,
String? signature,
String? captchaToken,
Map<String, dynamic>? variables}) async {
String path = 'requestSmsCode';
Map<String, dynamic> data = {'mobilePhoneNumber': mobile};
if (template != null) {
data['template'] = template;
}
if (signature != null) {
data['sign'] = signature;
}
if (captchaToken != null) {
data['validate_token'] = captchaToken;
}
if (variables != null) {
variables.forEach((k, v) {
data[k] = v;
});
}
await LeanCloud._httpClient.post(path, data: data);
}