All Products
Search
Document Center

Short Message Service:API integration overview

Last Updated:Jul 17, 2024

You can integrate Short Message Service (SMS) capabilities into your business system through programming. Messages can be automatically sent based on your business requirements, simplifying operations and reducing management costs. This topic describes the SMS API and the integration methods.

SMS API

SMS provides multiple API operations to meet your integration requirements. For example, you can call the API operations to manage qualifications, manage message templates, and send messages.

API version

API version

Description

2018-05-01

We recommend that you use this version.

Online debugging

SMS provides API debugging in OpenAPI Explorer. Before you call an API operation, you must understand the information provided by SMS, such as the API version, endpoints, API style, and request methods.

image.png

To perform API debugging, visit the following link: https://next.api.alibabacloud.com/api/Dysmsapi/2018-05-01/

Endpoints

Select an endpoint based on the region where your resource resides to reduce latency.

  • If you use the domestic SMS service, use the global endpoint dysmsapi.aliyuncs.com.

  • If you use the international SMS service, use the Singaporean endpoint dysmsapi.ap-southeast-1.aliyuncs.com.

For more information, see Endpoints.

Supported identities

SMS allows you to call API operations by using the following identities. We recommend that you use a RAM user or RAM role to call API operations. Before you use a RAM user or RAM role to call API operations, you must grant the required permissions to the RAM user or RAM role.

Identity

Supported

Alibaba Cloud account

Yes

RAM user (recommended)

Yes

RAM role (recommended)

Yes

Integration methods

SMS provides multiple integration methods. You can select a method based on your business requirements.

Alibaba Cloud SDKs

For more information about the programming languages and dependencies supported by SMS SDKs, see SDK reference.

Custom encapsulation

If none of the preceding methods meet your business requirements, you can encapsulate API requests on your own. However, this method is not recommended. For more information, see Request syntax and signature method V3.

Usage notes

  • If an error is returned after you call an SMS API operation, you need to check whether the request parameters and their values are valid based on the error code. For more information, see Error codes.

  • You can also use Alibaba Cloud OpenAPI Diagnostics to perform self-service diagnostics based on the returned request ID or SDK error information.