Skip to Content

Go SDK

I. Preparation

1) Obtain SDK Key Information

2) Obtain Project ID

3) Apply for SMS Signature

  • International SMS: SMS signature can be omitted for international SMS.

4) Apply for SMS Template

II. Configure the SDK

1) Install the SDK

Refer to Surfercloud SDK Quick Start to install the SDK.

2) Parameter Description

  • Phone Numbers (PhoneNumbers): Supports both international SMS. For international SMS, use the format (86)13812345678, with the international dialing code prefixed to the phone number.
  • SMS Template ID (TemplateId): First-time users need to apply for a template in the Surfercloud console, and after approval, pass the template ID here.
  • SMS Template Parameter List (TemplateParams): Variables can be passed into the SMS template. If there are several variables in the template applied, the same number must be passed in.
  • SMS Signature (SigContent): First-time users need to apply for a signature in the Surfercloud console, and after approval, pass the signature here. The first applied signature will be the default signature, and if there is a default signature, this parameter can be omitted.
  1. SMS content is calculated based on 1 character for all letters, Chinese characters, and Chinese and English punctuation marks, and the content length must not exceed 600 characters.

  2. The maximum number of characters for a single send is 500. Letters, Chinese characters, Chinese, and English punctuation marks are all calculated as 1 character;

  3. SMS content must not contain special characters (you can check through the sensitive word detection tool in the SMS package page).

VI. Complete Example

Please contact technical support.

For other APIs such as Get SMS Receipt, please refer to the Code Examples in UAPI.