Credentials:


All requests to Yunpian's REST API require you to authenticate. Yunpian supports forms of authentication as below:
APIKEY is credentials you can find on the "Account Dashboard" page. It is the string of 32-bit characters


Please note that:


  1. Please add your server IP to IP whitelist
  1. The max frequency limit for a simple APIKEY is 3000TPS(Transactions Per Second), please contact us if you need more.


Creating or Updating Resources with the HTTP POST Methods:


Creating or updating a resource involves performing an HTTP POST to a resource URL. In the HTTP POST, you represent the properties of the object you wish to update as form urlencode key-value pair. Please set the HTTP Content-Type header to "application/x-www-form-urlencoded" for your requests.


BASE URL:


https://{type}.yunpian.com/{version}


{type} is the type of product. For example, SMS is "sms". Audio CAPTCHA and voice notification is "voice".


{version} is the version number of API. The current API version for Yunpian is v2.


URL Format:


/{resource}/{function}.{format}


Description:


{resource} indicates the resource type. It can be user/tpl/sms, and so on. {function} indicates the operation on the resource provided. Base operation like get/set/send, and so on.


{format} indicates the data format you want to receive. Yunpian currently support JSON representations.


Yunpian REST API is served over HTTP/HTTPS. To ensure the privacy of data, HTTPS is strongly suggested.


HTTP Header:


Accept: application/json;charset=utf-8;  
Content-Type:application/x-www-form-urlencoded;charset=utf-8;


Description:


Method: POST


Encoded: UTF-8


Best Practise:


  • Use the single send SMS API. It matches the SMS template automatically.
  • Please set your IP whitelist. Suggest to add your IP to the IP whitelist.
  • Please complete your account information. It includes the balance alert threshold, contact person, emergency contact and so on. It can help us to provide the better support.