Viber Messaging

Reach over 900 Million users with Viber. Viber Messaging allows you to send messages of up to 1000 characters without any symbol and encoding restrictions.

You may add to your text to an image, a button to a personal page, a link, stickers, emoticons, video and voice, delivered to every country of the world.

Exceed SMS limitations for length and interactivity. Deliver messages with fallback to SMS if your customers dont support Viber.

Pay only for a delivered message. At a fixed price.

免费试用-无需信用卡

我们的价格


目的地

批量费率

没有合同,没有承诺,只为您使用的东西付费。如果大量使用SMS API,我们的销售团队将准备给予更多折扣。联系我们以获取更多详细信息。


Contact Sales →

短信

通过我们全球连接的API快速,可靠地传递消息

出站

入站

Viber

带有图像和SMS后备服务的功能丰富的消息

入站

WhatsApp的

WhatsApp商业通讯服务

Viber Messaging API

Integrate with SMS.to powerful Viber Messaging API


获取API密钥 →
curl -L -X POST "https://api.sms.to/viber/send" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY_OR_ACCESS_TOKEN>" \
-d "{
	"message": "This is a test message",
	"to": "+355692179931",
	"sender_id": "SMS.to"
	"callback_url": "https://example.com/callback/handler",
	"viber_image_url": "https://example.com/callback/handler",
	"viber_target_url": "https://example.com/callback/handler",
	"viber_caption": "Test"
}"
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
	CURLOPT_URL => "https://api.sms.to/viber/send",
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_ENCODING => "",
	CURLOPT_MAXREDIRS => 10,
	CURLOPT_TIMEOUT => 0,
	CURLOPT_FOLLOWLOCATION => true,
	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	CURLOPT_CUSTOMREQUEST => "POST",
	CURLOPT_POSTFIELDS =>"{\n    \"message\": \"This is a test message\",\n    \"to\": \"+355692179931\",\n    \"sender_id\": \"SMS.to\",\n    \"callback_url\": \"https://example.com/callback/handler\",\n    \"viber_image_url\": \"https://example.com/callback/handler\",\n    \"viber_target_url\": \"https://example.com/callback/handler\",\n    \"viber_caption\": \"Test\"    \n}",
	CURLOPT_HTTPHEADER => array(
			"Content-Type: application/json",
			"Accept: application/json",
			"Authorization: Bearer <YOUR_API_KEY_OR_ACCESS_TOKEN>"
		),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var https = require('follow-redirects').https;

var options = {
	'method': 'POST',
	'hostname': 'https://api.sms.to',
	'path': '/viber/send',
	'headers': {
		'Content-Type': 'application/json',
		'Authorization': 'Bearer <YOUR_API_KEY_OR_ACCESS_TOKEN>'
	},
	'maxRedirects': 20
};

var req = https.request(options, function (res) {
	var chunks = [];

	res.on("data", function (chunk) {
		chunks.push(chunk);
	});

	res.on("end", function (chunk) {
		var body = Buffer.concat(chunks);
		console.log(body.toString());
	});

	res.on("error", function (error) {
		console.error(error);
	});
});

var postData =  "{\n    \"message\": \"This is a test message\",\n    \"to\": \"+355692179931\",\n    \"sender_id\": \"SMS.to\",\n    \"callback_url\": \"https://example.com/callback/handler\",\n    \"viber_image_url\": \"https://example.com/callback/handler\",\n    \"viber_target_url\": \"https://example.com/callback/handler\",\n    \"viber_caption\": \"Test\"    \n}";

req.write(postData);

req.end();
require "uri"
require "net/http"

url = URI("https://api.sms.to/viber/send")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer <YOUR_API_KEY_OR_ACCESS_TOKEN>"
request.body = "{\n    \"message\": \"This is a test message\",\n    \"to\": \"+355692179931\",\n    \"sender_id\": \"SMS.to\",\n    \"callback_url\": \"https://example.com/callback/handler\",\n    \"viber_image_url\": \"https://example.com/callback/handler\",\n    \"viber_target_url\": \"https://example.com/callback/handler\",\n    \"viber_caption\": \"Test\"    \n}"

response = https.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("https://api.sms.to")
payload = "{\n    \"message\": \"This is a test message\",\n    \"to\": \"+355692179931\",\n    \"sender_id\": \"SMS.to\",\n    \"callback_url\": \"https://example.com/callback/handler\",\n    \"viber_image_url\": \"https://example.com/callback/handler\",\n    \"viber_target_url\": \"https://example.com/callback/handler\",\n    \"viber_caption\": \"Test\"    \n}"
headers = {
	'Content-Type': 'application/json',
	'Authorization': 'Bearer <YOUR_API_KEY_OR_ACCESS_TOKEN>'
}
conn.request("POST", "/viber/send", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient().newBuilder()
	.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"message\": \"This is a test message\",\n    \"to\": \"+355692179931\",\n    \"sender_id\": \"SMS.to\",\n    \"callback_url\": \"https://example.com/callback/handler\",\n    \"viber_image_url\": \"https://example.com/callback/handler\",\n    \"viber_target_url\": \"https://example.com/callback/handler\",\n    \"viber_caption\": \"Test\"    \n}");
Request request = new Request.Builder()
	.url("https://api.sms.to/viber/send")
	.method("POST", body)
	.addHeader("Content-Type", "application/json")
	.addHeader("Authorization", "Bearer <YOUR_API_KEY_OR_ACCESS_TOKEN>")
	.build();
Response response = client.newCall(request).execute();
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.sms.to/viber/send"
	method := "POST"

	payload := strings.NewReader("{\n    \"message\": \"This is a test message\",\n    \"to\": \"+355692179931\",\n    \"sender_id\": \"SMS.to\",\n    \"callback_url\": \"https://example.com/callback/handler\",\n    \"viber_image_url\": \"https://example.com/callback/handler\",\n    \"viber_target_url\": \"https://example.com/callback/handler\",\n    \"viber_caption\": \"Test\"    \n}")

	client := &http.Client {
	}
	req, err := http.NewRequest(method, url, payload)

	if err != nil {
		fmt.Println(err)
	}
	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("Authorization", "Bearer <YOUR_API_KEY_OR_ACCESS_TOKEN>")

	res, err := client.Do(req)
	defer res.Body.Close()
	body, err := ioutil.ReadAll(res.Body)

	fmt.Println(string(body))
}

Ready to start with Viber Messaging?


安全付款