Global Reach

We guarantee the global reach to more than 200 countries

Direct Connectivity

We connect directly to telecom carriers whenever and wherever possible, reducing cost, latency and points of failure

High Conversion Rate

We do our best effort to deliver your messages in a timely manner, using smart routing algorithm

99.97% Uptime

Our smart load balancing and server failover solutions, combined with automatic traffic monitoring and alerts, guarantee a high service uptim

Professional Consulting Services

With years of experience in the global telecom industry, we will gladly share advice and good practices whenever you need help for your global expansion

Use Cases

Verification Code
Notifications
Promotional Messages

Code Samples

All PaaSoo services are accessible using either HTTP or HTTPS. However, for security reasons, we highly recommend all our customers to use the HTTPS protocol.

import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ChenQiaoZhen
 * @since 2019/2/28
 */
public class SendSMS {
    //Use UTF-8 Encoding to send messages
    private static String ENCODING = "UTF-8";
    //SMS API Url
    private static String URI_GET_SEND_SMS = "https://api.paasoo.cn/json";

    public static void main(String[] args) throws Exception {
        //Parameters
        String key = "********";
        String secret = "********";
        String from = "********";
        String to = "********";
        String text = "********";;

        System.out.println(SendSMS.getSendSms(key, secret, from, to, text));

    }

    /**
     * Send SMS
     *
     * @param key    account key
     * @param secret account paasword
     * @param from   SenderID
     * @param to     Message recipient
     * @param text   Message content
     * @return json  Response format
     * @throws Exception
     */

    private static String  getSendSms(String key, String secret, String from, String to, String text) throws Exception{
        Map params = new HashMap();
        params.put("key", key);
        params.put("secret", secret);
        params.put("from", from);
        params.put("to", to);
        params.put("text", text);
        return get(URI_GET_SEND_SMS, params);
    }

    /**
     *
     * @param url       Submission URL
     * @param paramsMap  parameters Map
     * @return          Response
     */
    public static String get(String url, Map paramsMap) {
        CloseableHttpClient httpClient = HttpClients.createDefault();
        CloseableHttpResponse response = null;
        InputStream is = null;
        try {
            List params = new ArrayList();
            for (Map.Entry param : paramsMap.entrySet()) {
                NameValuePair pair = new BasicNameValuePair(param.getKey(), param.getValue());
                params.add(pair);
            }
            String str = EntityUtils.toString(new UrlEncodedFormEntity(params, ENCODING));
            HttpGet httpGet = new HttpGet(url + "?" + str);
            response = httpClient.execute(httpGet);
            HttpEntity entity = response.getEntity();
            String result = EntityUtils.toString(entity);
            return result;
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (is != null) {
                try {
                    is.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (response != null) {
                try {
                    response.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (httpClient != null) {
                try {
                    httpClient.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return null;
    }

}

<?php

/**
 * Java code samples for the SMS http API
 * Based on Apache HttpClient 4.x
 */

class smsApi{
  
    //Encoding format: UTF-8
    const  ENCODING = "UTF-8";
    //SMS API endpoint; API_URL: API request URL
    const  URI_GET_SEND_SMS = "https://api.paasoo.cn/json";
    //Message status API endpoint; API_URL: API request URL
    const  URI_GET_SEND_RECORD = "https://api.paasoo.cn/dlr";
    //Account balance API endpoint; API_URL: API request URL
    const  URI_GET_USER_BALANCE = "https://api.paasoo.cn/balance";
    //Phone number format API endpoint; API_URL: API request URL
    const  URI_GET_VALID_NUMBER = "https://api.paasoo.cn/lookup";


    /**
     *Send SMS
     *
     * @param key    API Key
     * @param secret API Secret
     * @param from   SenderID
     * @param to     Destination number
     * @param text   Message content
     * @return json  Data format
     */

    public static function  getSendSms($key, $secret, $from, $to, $text) {  
        $text = urlencode($text);
        $url = self::URI_GET_SEND_SMS."?key=".$key."&secret=".$secret."&from=".$from."&to=".$to."&text=".$text;
        return self::geturl($url);
    }

    /**
     *check a message status
     *
     * @param key    API Key
     * @param secret API Secret
     * @param messageid   SenderID
     * @return json  Data format
     */

    public static function  getSendRecord($key, $secret, $messageid) {
        $url = self::URI_GET_SEND_RECORD."?key=".$key."&secret=".$secret."&messageid=".$messageid;
        return self::geturl($url);
    }


    /**
     *check the account balance
     *
     * @param key    API Key
     * @param secret API Secret
     * @return json  Data format
     */

    public static function  getUserBalance($key, $secret) {
        $url = self::URI_GET_USER_BALANCE."?key=".$key."&secret=".$secret;
        return self::geturl($url);
    }


    /**
     *check the validity of a phone number
     *
     * @param key    API Key
     * @param secret API Secret
     * @param countryCode   Country code of the destination number
     * @param nationalNumber   Local format of the destination number (without the initial 0)
     * @return
     * @return json  Data format
     */

    static function  getValidNumber($key, $secret, $countryCode, $nationalNumber) {
        $number = $countryCode.$nationalNumber;
        $url = self::URI_GET_VALID_NUMBER."?key=".$key."&secret=".$secret."&number=".$number;
        return self::geturl($url);
    }


    public static function geturl($url){
            //$headerArray =array("Content-type:application/x-www-form-urlencoded;","");
            $ch = curl_init();
            echo $url;
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); 
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            //curl_setopt($ch,CURLOPT_HTTPHEADER,$headerArray);
            $output = curl_exec($ch);
            curl_close($ch);
            print_r($output);
            //$output = json_decode($output,true);
            return $output;
    }

}

//Method 1:
//$smsApi = new smsApi();
//Method 2:
//echo smsApi::getSendSms($_REQUEST['key'],$_REQUEST['secret'],$_REQUEST['from'],$_REQUEST['to'],$_REQUEST['text']);
//echo smsApi::getSendRecord($_REQUEST['key'],$_REQUEST['secret'],$_REQUEST['messageid']);
//echo smsApi::getUserBalance($_REQUEST['key'],$_REQUEST['secret']);
echo smsApi::getValidNumber($_REQUEST['key'],$_REQUEST['secret'],$_REQUEST['countryCode'],$_REQUEST['nationalNumber']);
?>
  
import requests
from urllib.parse import urlencode

API = "https://api.paasoo.cn/json"
params = {
    "key": "",
    "secret": "",
    "from": "",
    "to": "",
    "text": ""
}

url = API + "?" + urlencode(params)
response = requests.get(url)
print(response.text)

  
More API code samples>>

SMS Price Inquiry

  • United States ( +1 )
  • EUR / Message
See more prices