Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying an SMS Template

Updated on 2025-01-14 GMT+08:00

Function

This API is used to query information about a created template.

URI

GET /v2/{project_id}/msgsms/templates

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining Account, User, and Project Information.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

app_key

No

String

Application key.

app_name

No

String

Application name.

end_time

No

String

End time.

flow_status

No

String

Process status.

  • Adopted: approved
  • Reviewing: under review
  • Reject: rejected
  • Disable: disabled
  • Pending: to be submitted
  • Adopted_inactive: approved, deactivated
  • SignReviewing: signature pending review (available only for Chinese mainland SMSs)

has_variable

No

String

Whether the template contains variables.

  • Yes
  • No

limit

No

Integer

Quantity. The default value is 10.

offset

No

Integer

Offset.

region

No

String

Region.

sign_name

No

String

Signature name.

sort_dir

No

String

Sorting method.

  • desc: The query results are displayed in the descending order.
  • asc: The query results are displayed in ascending order.

sort_key

No

String

Sorting field. Only create_time is supported.

start_time

No

String

Start time.

template_id

No

String

Template ID.

template_name

No

String

Template name.

template_type

No

String

Template type.

  • VERIFY_CODE_TYPE: verification code
  • NOTIFY_TYPE: notification

For international SMSs, the value is fixed to NOTIFY_TYPE.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Request body parameter type. This parameter must be set to application/json.

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

results

Array of SmsTemplateResp

Query result.

total

Long

Total number.

Table 5 SmsTemplateResp parameters

Parameter

Description

id

Primary key ID of the template. It is unique and is used to obtain, modify, and delete the template and query template variables.

template_name

Template name.

template_type

Template type.

template_content

Template content.

template_id

Template ID.

app_key

Application key.

sign_id

Signature ID.

create_time

Creation time.

customer_id

Customer ID.

has_variable

Whether the template contains variables.

flow_status

Process status.

status

Template statuses:

  • Test
  • Normal

universal_template

Whether the template is a general template.

review_desc

Review description.

country_name

Country or region.

Request Example

GET /v2/845ada5bc7444f1295cd517af0123da1/msgsms/templates?template_name=auto_test789 
Host: 100.85.***.***:30300
Content-Type: application/json
X-Auth-Token: ****

Response Example

{
    "results": [
        {
            "create_time": "2022-08-12 07:40:36",
            "customer_id": "******c55c3c4526b2ed7a0213bc9871",
            "tenant": {
                "customer_id": "******c55c3c4526b2ed7a0213bc9871",
                "customer_name": "****05",
                "enterprise_name": "Huawei Technologies Co., Ltd."
            },
            "id": "******27-37eb-4229-bee9-0eba4d8a897f",
            "template_type": "NOTIFY_TYPE",
            "template_name": "auto_test789",
            "app_name": "auto_test7890",
            "app_key": "******3baZf4c856O4Qrbqvui3K2",
            "sign_id": "******b9-4141-4e2d-9838-14889c32a4bf",
            "template_content": "Test",
            "has_variable": "No",
            "flow_status": "Reviewing",
            "status": "Normal",
            "universal_template": 0,
            "region": "cn",
            "brackets": "GB",
            "site": "cn",
            "urge_status": "NO",
            "is_support_multiomp": false,
            "country_name": ""
        }
    ],
    "total": 1
}

Returned Values

Returned Value

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

System error

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback