public static final class SendSmsRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
SendSmsRequest |
build() |
SendSmsRequest.Builder |
outId(String outId)
The extension field.
|
SendSmsRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
SendSmsRequest.Builder |
phoneNumbers(String phoneNumbers)
The mobile numbers of the recipients.
|
SendSmsRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
SendSmsRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
SendSmsRequest.Builder |
signName(String signName)
The signature.
|
SendSmsRequest.Builder |
smsUpExtendCode(String smsUpExtendCode)
The extension code of the upstream message.
|
SendSmsRequest.Builder |
templateCode(String templateCode)
The code of the message template.
|
SendSmsRequest.Builder |
templateParam(String templateParam)
The value of the variable in the message template.
|
public SendSmsRequest.Builder outId(String outId)
The extension field.
example:You can ignore this parameter if you do not have special requirements.
abcdefgh
public SendSmsRequest.Builder ownerId(Long ownerId)
public SendSmsRequest.Builder phoneNumbers(String phoneNumbers)
The mobile numbers of the recipients. Format:
You can send messages to multiple mobile numbers, separate the mobile numbers with commas (,). You can specify up to 1,000 mobile numbers in each request. Compared with sending messages to a single mobile number, sending messages to multiple mobile numbers requires longer response time.
We recommend that you send one verification code message to a mobile number in each request.
This parameter is required.
example:1390000****
public SendSmsRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public SendSmsRequest.Builder resourceOwnerId(Long resourceOwnerId)
public SendSmsRequest.Builder signName(String signName)
The signature.
You can log on to the Short Message Service (SMS) console, click Go China or Go Globe in the left-side navigation pane, and then view the signature on the Signatures tab.
You must specify a signature that is created in the SMS console and approved by Alibaba Cloud. For more information about SMS signature specifications, see SMS signature specifications.
This parameter is required.
example:Aliyun
public SendSmsRequest.Builder smsUpExtendCode(String smsUpExtendCode)
The extension code of the upstream message. Upstream messages are messages sent to the communication service provider. Upstream messages are used to customize a service, complete an inquiry, or send a request. You are charged for sending upstream messages based on the billing standards of the service provider.
example: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 ignore this parameter if you do not have special requirements.
90999
public SendSmsRequest.Builder templateCode(String templateCode)
The code of the message template.
You can log on to the Short Message Service (SMS) console, click Go China or Go Globe in the left-side navigation pane, and then view the template code on the Templates tab.
You must specify a message template that is created in the SMS console and approved by Alibaba Cloud. If you send messages to countries or regions outside the Chinese mainland, use the corresponding message templates.
This parameter is required.
example:SMS_15305****
public SendSmsRequest.Builder templateParam(String templateParam)
The value of the variable in the message template. You can specify multiple parameter values. Example:{"name":"Sam","number":"1390000****"}.
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.
{"code":"1111"}
public SendSmsRequest build()
Copyright © 2026. All rights reserved.