Skip to Content

PHP SDK

I. Preparation

1) Obtaining SDK Key Information

2) Obtaining Project ID

3) Applying for SMS Signature

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

4) Applying for SMS Template

II. Configuring the SDK

1) Installing the SDK

Refer to the Surfercloud SDK Quick Start 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 Surfercloud 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 Surfercloud console. After approval, pass the signature to this field. If there is a default signature, this parameter can be omitted.
  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.