QuerySmsTemplateList

Updated at:

Queries all templates under your account to help you view template details, including the review status, templatetype, and template content.

Operation description

  • This operation queries the details of all templates under your current account. If you need to query more information such as the template variable content and the file materials uploaded during the application, you can call the GetSmsTemplate operation to query the review details of a single template by template code.

  • You can also log on to the Template Management page in the Short Message Service (SMS) console to view the details of all templates under your current account.

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:QuerySmsTemplateList

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PageIndex

integer

No

The current page number. Default value: 1.

1

PageSize

integer

No

The number of templates to return on each page. Valid values: 1 to 50. Default value: 10.

10

SkuCode

string

No

The specification code of Short Message Service (SMS), which is used to filter templates.

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request. It is a unique identifier generated by Alibaba Cloud for the request and can be used to troubleshoot and locate issues.

819BE656-D2E0-4858-8B21-B2E47708****

Code

string

The status code of the request.

  • A value of OK indicates that the request is successful.

  • For other error codes, see Error codes.

OK

Message

string

The description of the status code.

OK

SmsTemplateList

array<object>

The list of results.

array<object>

The details of a single template.

TemplateCode

string

The code of the SMS template.

SMS_1525***

TemplateName

string

The name of the SMS template.

Verification code template

OuterTemplateType

integer

The templatetype for external use. Valid values:

  • 0: authenticate code message.

  • 1: notification message.

  • 2: promotional message.

  • 3: international message or message to the Hong Kong, Macao, or Taiwan region.

0

AuditStatus

string

The review status of the template. Valid values:

  • AUDIT_STATE_INIT: under review.

  • AUDIT_STATE_PASS: approved.

  • AUDIT_STATE_NOT_PASS: rejected. You can view the reason for rejection in the Reason response parameter.

  • AUDIT_SATE_CANCEL: review canceled.

AUDIT_STATE_PASS

TemplateContent

string

The content of the template.

Your verification code is ${code}. You are registering as a platform member. Thank you for your support!

CreateDate

string

The time when the template was created. The time is in the yyyy-MM-dd HH:mm:ss format.

2020-06-04 11:42:17

Reason

object

The review result.

RejectDate

string

The time when the template was rejected. The time is in the yyyy-MM-dd HH:mm:ss format.

2020-06-04 16:01:17

RejectInfo

string

The reason for rejection.

Variables do not meet specifications

RejectSubInfo

string

The detailed description of the rejection reason.

Variable attribute selection fault. Select an appropriate variable attribute based on your business Scenarios.

OrderId

string

The ticket ID.

This parameter is used by reviewers when querying the review. You must provide this ticket ID when requesting an expedited review.

2004983****

TemplateType

integer

The templatetype. Valid values:

  • 0: notification message.

  • 1: promotional message.

  • 2: authenticate code message.

  • 6: international message or message to the Hong Kong, Macao, or Taiwan region.

2

SignatureName

string

The name of the associated signature.

Alibaba Cloud

TrafficDriving

string

The JSON string of the traffic redirection information list.

Important The value must be in JSON format. Convert it to a string before passing it.

1. Field description:

{ "trafficDrivingType":"Traffic redirection type", "trafficDrivingContent":"Traffic redirection content", "variableName":"Variable name", "companyName":Enterprise or institution name, "organizationCode":Unified social credit code, "icpNo":ICP filing number or license number, "icpPicOssKey":OSS key of the ICP filing screenshot, "companyDifferentFromSignQuaReason":Reason why the enterprise or institution name is different from the signature qualification }

2. Precautions:

  • If it is not a variable, do not pass variableName.

  • If the enterprise or institution name is different from the enterprise or institution name in the associated signature qualification, pass companyDifferentFromSignQuaReason.

  • If trafficDrivingType is DOMAIN, pass all parameters.

  • If trafficDrivingType is other values, pass trafficDrivingType, trafficDrivingContent, variableName (as needed), companyName, organizationCode, and companyDifferentFromSignQuaReason (as needed).

3. Enum values for trafficDrivingType:

  • DOMAIN: domain name link.

  • FIXED_PHONE: landline.

  • 400_PHONE: 400-prefixed phone number.

  • 800_PHONE: 800-prefixed phone number.

  • 95_PHONE: 95-prefixed phone number.

  • 96_PHONE: 96-prefixed phone number.

  • 1_PHONE: 1-prefixed, 3- to 5-digit phone number.

  • OTHER_PHONE: other numbers.

[{"trafficDrivingType":"DOMAIN","trafficDrivingContent":"aliyun.com","companyName":"Alibaba Cloud Computing Co., Ltd.","organizationCode":"91330****73959654P","icpNo":"浙B2-20****01-4","icpPicOssKey":"db7784d8-cb0c-498f-****-295f1ad6d665_mf29l7nf.png","companyDifferentFromSignQuaReason":"This is a description text"},{"trafficDrivingType":"1_PHONE","trafficDrivingContent":"1**86","variableName":"my1Phone","companyName":"Alibaba Cloud Computing Co., Ltd.","organizationCode":"91330****73959654P","companyDifferentFromSignQuaReason":"This is a description text"}]

SaleSkuCode

string

The specification code of Short Message Service (SMS).

SkuName

string

The specification name of Short Message Service (SMS).

Verification code - Standard

TotalCount

integer

The total number of templates queried in this request.

100

CurrentPage

integer

The current page number. Default value: 1.

1

PageSize

integer

The number of templates to return on each page. Valid values: 1 to 50.

10

Examples

Success response

JSON format

{
  "RequestId": "819BE656-D2E0-4858-8B21-B2E47708****",
  "Code": "OK",
  "Message": "OK",
  "SmsTemplateList": [
    {
      "TemplateCode": "SMS_1525***",
      "TemplateName": "Verification code template",
      "OuterTemplateType": 0,
      "AuditStatus": "AUDIT_STATE_PASS",
      "TemplateContent": "Your verification code is ${code}. You are registering as a member. Thank you for your support!",
      "CreateDate": "2020-06-04 11:42:17",
      "Reason": {
        "RejectDate": "2020-06-04 16:01:17",
        "RejectInfo": "The variable does not comply with the specifications",
        "RejectSubInfo": "The variable attribute selection is a fault.\nSelect a variable attribute that is suitable for your business scenarios."
      },
      "OrderId": "2004983****",
      "TemplateType": 2,
      "SignatureName": "阿里云",
      "TrafficDriving": "[{\"trafficDrivingType\":\"DOMAIN\",\"trafficDrivingContent\":\"aliyun.com\",\"companyName\":\"Alibaba Cloud Computing Co., Ltd.\",\"organizationCode\":\"91330****73959654P\",\"icpNo\":\"ZheB2-20****01-4\",\"icpPicOssKey\":\"db7784d8-cb0c-498f-****-295f1ad6d665_mf29l7nf.png\",\"companyDifferentFromSignQuaReason\":\"This is a description\"},{\"trafficDrivingType\":\"1_PHONE\",\"trafficDrivingContent\":\"1**86\",\"variableName\":\"my1Phone\",\"companyName\":\"Alibaba Cloud Computing Co., Ltd.\",\"organizationCode\":\"91330****73959654P\",\"companyDifferentFromSignQuaReason\":\"This is a description\"}]",
      "SaleSkuCode": "",
      "SkuName": "验证码-标准"
    }
  ],
  "TotalCount": 100,
  "CurrentPage": 1,
  "PageSize": 10
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.