Global Reach

We guarantee the global reach to more than 200 countries

High Quality Voice

Our global connectivity provides rystal clear voice quality and low latency, for a better user experience

Customizable Parameters

The voice speed and repeat times can be customized in order to increase the conversion rate

Caller IDs

We provide premium CLI routes with customizable caller IDs, effectively increasing the answer rate

Use Cases

"Your Paasoo verification code is 630006"

Voice verification code

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;


public class ValidVoice {
    //Use UTF-8 Encoding to send messages
    private static String ENCODING = "UTF-8";
    private static String URI_GET_VALID_VOICE = "https://api.paasoo.cn/voice";
    public static void main(String[] args) throws Exception {
        //Parameters
        String key = "********";
        String secret = "********";
        String from = "********";
        String to = "********";
        String lang = "********";
        String text = "********";
        String repeat = "********";

        System.out.println(ValidVoice.getValidVoice(key, secret, from, to, lang, text, repeat));
    }

    /**
     *
     * @param key       account key
     * @param secret    account password
     * @param from      
     * @param to        
     * @param lang      language in which the receiver receives voice messages
     * @param text      message content
     * @param repeat    Number of times the voice message will be repeated, default 1
     * @return
     * @throws Exception
     */
    private static String getValidVoice(String key, String secret, String from, String to, String lang, String text, String repeat) throws Exception {
        Map params = new HashMap();
        params.put("key", key);
        params.put("secret", secret);
        params.put("from", from);
        params.put("to", to);
        params.put("lang", lang);
        params.put("text", text);
        params.put("repeat", repeat);
        return get(URI_GET_VALID_VOICE, params);
    }

    /**
     * General GET Method Based on HttpClient 4.X
     *
     * @param url       Submission URL
     * @param paramsMap  parameters Map
     * @return          Response
     */
    public static String get(String url, Map paramsMap) throws Exception {
        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;
    }
}

import requests
from urllib.parse import urlencode

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

url = API + "?" + urlencode(params)
response = requests.get(url)
print(response.text)
                            
444
More API code samples>>