public static final class SendSmsVerifyCodeRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
SendSmsVerifyCodeRequest |
build() |
SendSmsVerifyCodeRequest.Builder |
codeLength(Long codeLength)
The length of the verification code.
|
SendSmsVerifyCodeRequest.Builder |
codeType(Long codeType)
The type of the generated verification code.
|
SendSmsVerifyCodeRequest.Builder |
countryCode(String countryCode)
The country code of the phone number.
|
SendSmsVerifyCodeRequest.Builder |
duplicatePolicy(Long duplicatePolicy)
Specifies how to handle the verification codes received earlier in a case where verification codes are sent to the same phone number for the same scenario within the validity period.
|
SendSmsVerifyCodeRequest.Builder |
interval(Long interval)
The time interval.
|
SendSmsVerifyCodeRequest.Builder |
outId(String outId)
The external ID.
|
SendSmsVerifyCodeRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
SendSmsVerifyCodeRequest.Builder |
phoneNumber(String phoneNumber)
The phone number.
|
SendSmsVerifyCodeRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
SendSmsVerifyCodeRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
SendSmsVerifyCodeRequest.Builder |
returnVerifyCode(Boolean returnVerifyCode)
Specifies whether to return a verification code.
|
SendSmsVerifyCodeRequest.Builder |
schemeName(String schemeName)
The verification service name.
|
SendSmsVerifyCodeRequest.Builder |
signName(String signName)
The signature.
|
SendSmsVerifyCodeRequest.Builder |
smsUpExtendCode(String smsUpExtendCode)
The extension code of the upstream text message.
|
SendSmsVerifyCodeRequest.Builder |
templateCode(String templateCode)
The code of the text message template.
|
SendSmsVerifyCodeRequest.Builder |
templateParam(String templateParam)
The value of the variable in the text message template.
|
SendSmsVerifyCodeRequest.Builder |
validTime(Long validTime)
The validity period of the verification code.
|
public SendSmsVerifyCodeRequest.Builder codeLength(Long codeLength)
public SendSmsVerifyCodeRequest.Builder codeType(Long codeType)
* 1: digits only * 2: uppercase letters only * 3: lowercase letters only * 4: uppercase and lowercase letters * 5: digits and uppercase letters * 6: digits and lowercase letters * 7: digits and uppercase and lowercase letters
public SendSmsVerifyCodeRequest.Builder countryCode(String countryCode)
public SendSmsVerifyCodeRequest.Builder duplicatePolicy(Long duplicatePolicy)
* 1 (default): The latest verification code overwrites the verification codes received earlier. In this case, verification codes received earlier expire. * 2: Verification codes within their validity period are valid and can be used for verification.
public SendSmsVerifyCodeRequest.Builder interval(Long interval)
public SendSmsVerifyCodeRequest.Builder outId(String outId)
public SendSmsVerifyCodeRequest.Builder ownerId(Long ownerId)
public SendSmsVerifyCodeRequest.Builder phoneNumber(String phoneNumber)
public SendSmsVerifyCodeRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public SendSmsVerifyCodeRequest.Builder resourceOwnerId(Long resourceOwnerId)
public SendSmsVerifyCodeRequest.Builder returnVerifyCode(Boolean returnVerifyCode)
* **true** * **false**
public SendSmsVerifyCodeRequest.Builder schemeName(String schemeName)
public SendSmsVerifyCodeRequest.Builder signName(String signName)
public SendSmsVerifyCodeRequest.Builder smsUpExtendCode(String smsUpExtendCode)
> The extension code is automatically generated by the system when the signature is generated. You do not need to specify the extension code. You can skip this parameter based on your business requirements. If you want to use custom extension codes, contact your account manager.
public SendSmsVerifyCodeRequest.Builder templateCode(String templateCode)
Log on to the [SMS console](https://dysms.console.aliyun.com/dysms.htm?spm=5176.12818093.categories-n-products.ddysms.3b2816d0xml2NA#/overview). In the left-side navigation pane, click **Go China** or **Go Globe**. You can view the text message template code in the **Template Code** column on the **Message Templates** tab. > The text message templates must be created on the Go Globe page and approved.
public SendSmsVerifyCodeRequest.Builder templateParam(String templateParam)
Example 1: For a system-defined template that contains variables, if the template content is "Your verification code is ${code} and valid for 5 minutes. Do not disclose the verification code to others.", specify the value of this parameter as {"code":"##code##"} Example 2: For a custom template, if the template content is ${content}, specify the value of this parameter as {"content":"Your verification code is ##code## and must be used within 5 minutes."}. > * If line breaks are required in JSON-formatted data, they must meet the relevant requirements that are specified in the standard JSON protocol. * For more information about template variables, see [SMS template specifications](~~108253~~).
public SendSmsVerifyCodeRequest.Builder validTime(Long validTime)
public SendSmsVerifyCodeRequest build()
Copyright © 2024. All rights reserved.