# Go SDK

## I. Preparation

### 1) Obtain SDK Key Information

  - Obtain the SDK key information, that is, the public key (PublicKey) and private key (PrivateKey), which can be obtained from [API Product/API Key](https://console.scloudsg.com/uapi/apikey). For detailed steps, refer to: [How to Obtain Public Key and Private Key](/docs/usms/faq/1109).

### 2) Obtain Project ID

  - This is the Project ID of the currently used project under the current account, which can be obtained from [Resource Dashboard](https://console.scloudsg.com/dashboard). For detailed steps, refer to: [How to Obtain Project ID](/docs/usms/faq/1109).

### 3) Apply for SMS Signature

  - **International SMS**: SMS signature can be omitted for international SMS.

### 4) Apply for SMS Template

  - **International SMS**: You can apply for an SMS template in the **International SMS/SMS Signature** module of the [SMS Service Console](https://console.scloudsg.com/usms). For detailed application steps, refer to: [How to Apply for SMS Template](/docs/usms/guide/5005/505#二、自助申请短信模板).

## II. Configure the SDK

### 1) Install the SDK

Refer to SCloud SDK [Quick Start](/opensdk-go/quickstart) 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 SCloud 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 SCloud 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.

### 3) Related Limitations

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](/docs/api/usms-api/get_usms_send_receipt), please refer to the [Code Examples in UAPI](https://console.scloudsg.com/uapi/detail#getusmssendreceipt).