Tüm Ürünler
Search
Belge Merkezi

:SendMessageWithTemplate

Son Güncelleme:Sep 30, 2026

Bir mesaj şablonu kullanarak Çin anakarasına mesaj gönderir.

Operation description

Kullanım notları

SendMessageWithTemplate işlemini yalnızca Çin anakarasına mesaj göndermek için çağırabilirsiniz.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dysms:SendMessageWithTemplate

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

To

string

Yes

Mesajın gönderildiği cep telefonu numarası. Cep telefonu numarasının başına ülke kodunu eklemelisiniz. Örnek: 861503871****.

Daha fazla bilgi için bkz. Arama kodları.

861503871****

From

string

Yes

İmza. İmzayı sorgulamak için Kısa Mesaj Hizmeti (SMS) konsolunda oturum açın ve Go China sayfasının İmzalar sekmesine gidin.

Alicloud321

TemplateCode

string

Yes

Mesaj şablonunun kodu. Kodu sorgulamak için SMS konsolunda oturum açın ve Go China sayfasının Şablonlar sekmesine gidin.

SMS_****

TemplateParam

string

No

Mesaj şablonundaki değişkenin değeri. Şablonda bir değişken varsa bu parametre gereklidir.

{"code":"1234","product":"ytx"}

SmsUpExtendCode

string

No

MO mesajının uzantı kodu.

90999

ValidityPeriod

integer

No

Mesajın geçerlilik süresi.

1

ChannelId

string

No

Kanalın kimliği.

5739

Response elements

Element

Type

Description

Example

object

ResponseCode

string

Teslimat isteğinin durum kodu.

OK

NumberDetail

object

Alıcının cep telefonu numarasına ilişkin ayrıntılar.

Carrier

string

Cep telefonu numarasının sahibi olan operatör.

China Mobile

Region

string

Cep telefonu numarasının ait olduğu bölge.

Nanjing, Jiangsu

Country

string

Cep telefonu numarasının ait olduğu ülke.

China

ResponseDescription

string

Teslimat isteği durumunun açıklaması.

The SMS Send Request was accepted

Segments

string

Ücretlendirilen mesaj sayısı.

1

To

string

Mesajın gönderildiği cep telefonu numarası. Cep telefonu numarasının başına arama kodu eklenmiştir. Örnek: 861503871****.

861503871****

MessageId

string

Mesajın kimliği.

1**************3

RequestId

string

İsteğin kimliği.

F655A8D5-B967-440B-8683-DAD6FF8D23D6

Examples

Success response

JSON format

{
  "ResponseCode": "OK",
  "NumberDetail": {
    "Carrier": "China Mobile",
    "Region": "Nanjing, Jiangsu",
    "Country": "China"
  },
  "ResponseDescription": "The SMS Send Request was accepted",
  "Segments": "1",
  "To": "861503871****",
  "MessageId": "1**************3",
  "RequestId": "F655A8D5-B967-440B-8683-DAD6FF8D23D6"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.