All Products
Search
Document Center

Short Message Service:SDK reference

Last Updated:Apr 09, 2025

The SMS SDK is a dependency package that simplifies development work by encapsulating the underlying API calls. It internally handles complex details such as network communication, request formatting, and response parsing, and supports multiple programming languages. Through simple interfaces, you can quickly perform operations like signature management, template management, and SMS sending, allowing you to focus solely on implementing your business logic without worrying about the underlying technical details.

SDK download links

The SMS SDK supports multiple programming languages. You can install the SDK by using the method provided in OpenAPI Explorer. You can also view the source code and related installation guidelines on GitHub. We recommend that you install the SDK by using mainstream dependency management tools of programming languages.

Language

SDK installation method

GitHub address

Quick start

Java

SDK for Java

java-dysmsapi-20180501

Use Alibaba Cloud SDKs for Java in an IDE

Python

SDK for Python

python-dysmsapi-20180501

Use Alibaba Cloud SDKs for Python in an IDE

PHP

SDK for PHP

php-dysmsapi-20180501

Use Alibaba Cloud SDKs for PHP in an IDE

Go

SDK for Go

go-dysmsapi-20180501

Use the Alibaba Cloud SDKs for Go in an IDE

TypeScript

SDK for TypeScript

typescript-dysmsapi-20180501

Use Alibaba Cloud SDKs for Node.js in an IDE

C++

SDK for Swift

cpp-dysmsapi-20180501

N/A

C#

SDK for C#

csharp-dysmsapi-20180501

Use Alibaba Cloud SDKs for .NET in an IDE

Swift

SDK for Swift

swift-dysmsapi-20180501

N/A

Usage example

The following example demonstrates how to use the SMS SDK to send a message to a specified phone number.

Note

Before using the sample code, you need to understand the following parameters:

  • Endpoint: The service address of SMS, which is dysmsapi.ap-southeast-1.aliyuncs.com.

  • AccessKeyId and AccessKeySecret: Your AccessKey pair information. You can view the AccessKey ID in the Resource Access Management console by clicking the RAM username. The AccessKey secret cannot be viewed after creation. If you do not have a local backup, we recommend that you create a new AccessKey pair.