# PHP SDK

## I. Preparation

### 1) Obtaining SDK Key Information

  - Obtain the SDK key information, namely the public key (also known as PublicKey) and private key (also known as PrivateKey). You can acquire them from [API Product/API Key](https://console.scloudsg.com/uapi/apikey). See the steps in [How to Get Public Key and Private Key](/docs/usms/faq/1109).

### 2) Obtaining Project ID

  - This refers to the project ID of the current project in use by the current account. You can get the current project ID from the [Resource Statistics](https://console.scloudsg.com/dashboard). For detailed steps, see [How to Get Project ID](/docs/usms/faq/1109).

### 3) Applying for SMS Signature

  - **International SMS**: For international SMS, you may leave the SMS signature field empty.

### 4) Applying 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). See detailed application steps in [How to Apply for SMS Template](/docs/usms/guide/5005/505#二、自助申请短信模板).

## II. Configuring the SDK

### 1) Installing the SDK

Refer to the SCloud SDK [Quick Start](/opensdk-php/quickstart) to install the SDK.

### 2) Parameter Description

  - **Phone Number List** (PhoneNumbers): Supports both international SMS. Use format `(86)13812345678` for international SMS, with the international telephone area code prefixed to the mobile number.
  - **SMS Template ID** (TemplateId): For first-time users, you need to apply for a template on the SCloud console. After approval, pass the template ID to this field.
  - **SMS Template Parameter List** (TemplateParams): Variables can be passed into the SMS template. When applying a template, you need to pass as many variables as there are in the template.
  - **SMS Signature** (SigContent): For first-time use, you need to apply for a signature in the SCloud console. After approval, pass the signature to this field. If there is a default signature, this parameter can be omitted.

### 3) Related Restrictions

1. For SMS content, each letter, Chinese character, and punctuation mark (both Chinese and English) is calculated as 1 character, with a maximum length of 600 characters.

2. The maximum number of characters in **a single sending** is capped at 500, with each letter, Chinese character, and punctuation mark (both Chinese and English) considered as 1 character.

3. Avoid including special characters in SMS content (the SMS package page provides a sensitive word detection tool for checks).

## III. Complete Example

Please contact Technical Support.