Overview

Namespaces

  • LeanCloud
    • Engine
    • Operation
    • Storage
    • Uploader

Classes

  • ACL
  • AppRouter
  • Bytes
  • Client
  • File
  • GeoPoint
  • LeanObject
  • MIMEType
  • Push
  • Query
  • Region
  • Relation
  • Role
  • RouteCache
  • SaveOption
  • SMS
  • User

Exceptions

  • BatchRequestError
  • CloudException
  • Overview
  • Namespace
  • Class

Class SMS

SMS

Namespace: LeanCloud
Located at LeanCloud/SMS.php
Methods summary
public static
# requestSmsCode( string $phoneNumber, array $options = array() )

Request SMS code

Request SMS code

Besides sending default message with sms code, you can also send with a customized template, which though must be submitted and approved before sending.

The available of options are:

  • $smsType (string): "sms" or "voice"
  • $template (string): Template name that has been approved
  • $name (string): App name
  • $ttl (int): Number of minutes before sms code expires
  • $op (string): Operation name for the sms code

Parameters

$phoneNumber
$options

Link

https://leancloud.cn/docs/rest_sms_api.html
public static
# verifySmsCode( string $phoneNumber, string $smsCode )

Verify SMS code

Verify SMS code

Parameters

$phoneNumber
$smsCode
API documentation generated by ApiGen