SMS API
SMS API Solutions
for Developers
เชื่อมต่อแอปพลิเคชันของคุณกับ SMS API ของเรา ให้คุณสามารถส่งข้อความได้ถึง 200 ประเทศทั่วโลกได้อย่างรวดเร็ว ในราคาที่ถูกที่สุดและมีประสิทธิภาพที่สุด ตรวจสอบรายงานการจัดส่งได้แบบเรียลไทม์
ติดต่อ สอบถามข้อมูล API Documentation
Engage your customers globally
SMS API รองรับการส่งกว่า 200 ประเทศ
Short Message Service หรือ (SMS) คือรูปแบบการส่งข้อความที่ใช้กันอย่างแพร่หลายและเป็นที่นิยมมากที่สุด โดยใช้ประโยชน์จากโครงสร้างพื้นฐานโทรคมนาคมทั้งไร้สายและแบบดั้งเดิมในการส่ง ในขณะที่สามารถเข้าถึงได้ในระดับสากลผ่านอุปกรณ์มือถือ นักพัฒนาซอฟต์แวร์สามารถใช้ SMS Application Programming Interface (API) เพื่อโปรแกรมการเชื่อมต่อส่งข้อความเข้ากับแอปพลิเคชันหรือซอฟต์แวร์ได้อย่างง่ายดายและรวดเร็ว โดยผู้พัฒนาไม่ต้องใช้โครงสร้างพื้นฐานหรือความรู้ด้านโทรคมนาคมที่ซับซ้อน
Package & Pricing
แพคเกจและราคา
Thailand
ส่งอักษรภาษาไทยได้เยอะ
Thailand 1
1,080 ฿
- จำนวนข้อความ : 2,000
- ข้อความละ 0.54 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 2
5,400 ฿
- จำนวนข้อความ : 10,000
- ข้อความละ 0.54 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 3
20,250 ฿
- จำนวนข้อความ : 50,000
- ข้อความละ 0.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 4
37,800 ฿
- จำนวนข้อความ : 100,000
- ข้อความละ 0.37 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 5
64,800 ฿
- จำนวนข้อความ : 200,000
- ข้อความละ 0.32 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
จำนวนข้อความ
2,000
10,000
50,000
100,000
200,000
ราคา/ข้อความ
0.54 บาท
0.54 บาท
0.40 บาท
0.37 บาท
0.32 บาท
อายุการใช้งาน
6 เดือน
6 เดือน
6 เดือน
6 เดือน
6 เดือน
Sender Name
3
3
3
3
3
จำนวนตัวอักษร
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
Monitoring & Report
Global Plus
รองรับ 200 ประเทศทั่วโลก
Global Plus 1
540 ฿
- จำนวนข้อความ : 100
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Global Plus 2
16,200 ฿
- จำนวนข้อความ : 3,000
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Global Plus 3
43,200 ฿
- จำนวนข้อความ : 8,000
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Global Plus 4
108,000 ฿
- จำนวนข้อความ : 20,000
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
จำนวนข้อความ
100
3,000
8,000
20,000
ราคา/ข้อความ
5.40 บาท
5.40 บาท
5.40 บาท
5.40 บาท
อายุการใช้งาน
6 เดือน
6 เดือน
6 เดือน
6 เดือน
Sender Name
3
3
3
3
จำนวนตัวอักษร
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
Monitoring & Report
Thailand
ส่งอักษรภาษาไทยได้เยอะ
Thailand 1
1,080 ฿
- จำนวนข้อความ : 2,000
- ข้อความละ 0.54 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 2
5,400 ฿
- จำนวนข้อความ : 10,000
- ข้อความละ 0.54 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 3
20,250 ฿
- จำนวนข้อความ : 50,000
- ข้อความละ 0.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 4
37,800 ฿
- จำนวนข้อความ : 100,000
- ข้อความละ 0.37 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Thailand 5
64,800 ฿
- จำนวนข้อความ : 200,000
- ข้อความละ 0.32 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
จำนวนข้อความ
2,000
10,000
50,000
100,000
200,000
ราคา/ข้อความ
0.54 บาท
0.54 บาท
0.40 บาท
0.37 บาท
0.32 บาท
อายุการใช้งาน
6 เดือน
6 เดือน
6 เดือน
6 เดือน
6 เดือน
Sender Name
3
3
3
3
3
จำนวนตัวอักษร
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
Monitoring & Report
Global Plus
รองรับ 200 ประเทศทั่วโลก
Global Plus 1
540 ฿
- จำนวนข้อความ : 100
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Global Plus 2
16,200 ฿
- จำนวนข้อความ : 3,000
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Global Plus 3
43,200 ฿
- จำนวนข้อความ : 8,000
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
Global Plus 4
108,000 ฿
- จำนวนข้อความ : 20,000
- ข้อความละ 5.40 บาท
- อายุการใช้งาน 6 เดือน
- Sender Name : 3
- Monitoring & Report
จำนวนข้อความ
100
3,000
8,000
20,000
ราคา/ข้อความ
5.40 บาท
5.40 บาท
5.40 บาท
5.40 บาท
อายุการใช้งาน
6 เดือน
6 เดือน
6 เดือน
6 เดือน
Sender Name
3
3
3
3
จำนวนตัวอักษร
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
500 ตัวอักษร
ต่อ 1 ข้อความ
Monitoring & Report
หมายเหตุ
- ราคาแพ็กเกจยังไม่รวมภาษีมูลค่าเพิ่ม 7 %
- ระยะเวลาการขอ SENDER ID 14-30 วัน
Estimate your messaging costs
สั่งซื้อ SMS ในปริมาณที่มากกว่า 200,00 ข้อความ
ในราคาที่ถูกกว่า
ขอใบเสนอราคา
Cloud SMS API Advantages
ข้อดีของบริการ SMS API จาก THAI DATA CLOUD
ส่งข้อความได้สูงสุด 40,000 ข้อความ/นาที
Long Message Concatenation
SMS API ของ THAI DATA CLOUD อนุญาตให้คุณส่งข้อความได้สูงสุด 500 ตัวอักษรต่อ 1 ข้อความ ทั้งภาษาไทยและภาษาอังกฤษ
- Instant File Upload - อัปโหลดไฟล์ทันที
- Resumable Upload - หากการอัปโหลดหยุดชะงักสามารถอัปโหลดต่อเนื่องได้
- Easy Share - แชร์ไฟล์ในองค์กรเดียวกันหรือแชร์ไฟล์กับผู้ใช้ภายนอกได้
- Transfer Status Management - ระงับ ยกเลิก และจัดการสถานะอื่นๆ ได้
SMS API ที่ปลอดภัย
Easy integration
ระบบจะตรวจสอบโดยอัตโนมัติว่าใครเป็นผู้เรียกใช้ API เพิ่มความปลอดภัยและการมองเห็นสำหรับการเรียก API ทั้งหมด เพื่อให้แน่ใจว่ามีเพียงคุณเท่านั้นที่เรียกใช้ API ได้
SDKs และ APIs พร้อมใช้งานร่วมกับภาษาโปรแกรมเมอร์ต่างๆ ง่ายต่อการ Integrate ลดระยะเวลาและต้นทุนในการพัฒนาโปรแกรม
รายงานสถิติการส่งแบบเรียลไทม์
Real-time analytics
ระบบจัดทำแดชบอร์ดแสดงรายงานการส่งข้อความแบบเรียลไทม์
- Instant File Upload - อัปโหลดไฟล์ทันที
- Resumable Upload - หากการอัปโหลดหยุดชะงักสามารถอัปโหลดต่อเนื่องได้
- Easy Share - แชร์ไฟล์ในองค์กรเดียวกันหรือแชร์ไฟล์กับผู้ใช้ภายนอกได้
- Transfer Status Management - ระงับ ยกเลิก และจัดการสถานะอื่นๆ ได้
Our API Integrated Quick and Easy
เชื่อมต่อ API ได้อย่างรวดเร็ว
เริ่มส่งข้อความถึงลูกค้าของคุณวันนี้ด้วย SMS Service API ที่รวดเร็วและใช้งานง่ายและเอกสารเชิงลึกของเรา
API Documentation
curl -X 'POST' 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple'
-H 'accept: */*'
-H 'access-key-token: Access Key Token'
-H 'access-key-id: Access Key Id'
-H 'Content-Type: application/json'
-d '{
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
}'
require 'net/http'
require 'uri'
require 'json'
url = URI.parse('https://mooping-openapi.thaidata.cloud/v1.1/sms-simple')
headers = {
'accept' => '*/*',
'access-key-token' => 'Access Key Token',
'access-key-id' => 'Access Key Id',
'Content-Type' => 'application/json'
}
data = {
"phoneCode" => "Client Phone Country Code",
"phoneNumber" => "Client Phone Number",
"senderId" => "Your Activate SenderId",
"message" => "Message Content"
}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = (url.scheme == 'https')
request = Net::HTTP::Post.new(url.path, headers)
request.body = data.to_json
response = http.request(request)
puts "Response Code: #{response.code}"
puts "Response Body: #{response.body}"
import requests
import json
url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple'
headers = {
'accept': '*/*',
'access-key-token': 'Access Key Token',
'access-key-id': 'Access Key Id',
'Content-Type': 'application/json'
}
data = {
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(f"Response Code: {response.status_code}")
print("Response Body:", response.text)
<?php
$url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple';
$headers = array(
'accept: */*',
'access-key-token: Access Key Token',
'access-key-id: Access Key Id',
'Content-Type: application/json'
);
$data = array(
"phoneCode" => "Client Phone Country Code",
"phoneNumber" => "Client Phone Number",
"senderId" => "Your Activate SenderId",
"message" => "Message Content"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
}
curl_close($ch);
echo "Response Code: " . http_response_code() . " ";
echo "Response Body: " . $response . " ";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class HttpClientExample {
public static void main(String[] args) {
try {
String url = "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple";
URL obj = new URL(url);
HttpURLConnection connection = (HttpURLConnection) obj.openConnection();
// Set the HTTP POST method
connection.setRequestMethod("POST");
// Set request headers
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("access-key-token", "Access Key Token");
connection.setRequestProperty("access-key-id", "Access Key Id");
connection.setRequestProperty("Content-Type", "application/json");
// Enable input/output streams
connection.setDoOutput(true);
connection.setDoInput(true);
// JSON data to send
String jsonData = "{" +
"phoneCode": "Client Phone Country Code"," +
"phoneNumber": "Client Phone Number"," +
"senderId": "Your Activate SenderId"," +
"message": "Message Content"" +
"}";
// Send POST data
try (DataOutputStream wr = new DataOutputStream(connection.getOutputStream())) {
wr.writeBytes(jsonData);
wr.flush();
}
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("Response Body: " + response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
const axios = require('axios');
const url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple';
const headers = {
'accept': '*/*',
'access-key-token': 'Access Key Token',
'access-key-id': 'Access Key Id',
'Content-Type': 'application/json'
};
const data = {
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
};
axios.post(url, data, { headers })
.then(response => {
console.log("Response Code:" , response.status);
console.log("Response Body:", response.data);
})
.catch(error => {
console.error(error);
});
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple";
var headers = new System.Net.Http.Headers.HttpRequestHeaders();
headers.Add("accept", "*/*");
headers.Add("access-key-token", "Access Key Token");
headers.Add("access-key-id", "Access Key Id");
headers.Add("Content-Type", "application/json");
var data = new
{
phoneCode = "Client Phone Country Code",
phoneNumber = "Client Phone Number",
senderId = "Your Activate SenderId",
message = "Message Content"
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Clear();
client.DefaultRequestHeaders.AddHeaders(headers);
var jsonContent = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, jsonContent);
Console.WriteLine($"Response Code: {(int)response.StatusCode} {response.ReasonPhrase}");
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response Body:");
Console.WriteLine(responseContent);
}
else
{
Console.WriteLine("Request failed.");
}
}
}
}
package main
import (
"bytes"
"fmt"
"net/http"
"encoding/json"
)
func main() {
url := "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple"
headers := map[string]string{
"accept": "*/*",
"access-key-token": "Access Key Token",
"access-key-id": "Access Key Id",
"Content-Type": "application/json",
}
data := map[string]interface{}{
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content",
}
jsonData, err := json.Marshal(data)
if err != nil {
fmt.Println("Error marshaling JSON data:", err)
return
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
for key, value := range headers {
req.Header.Set(key, value)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
fmt.Printf("Response Code: %d %s", resp.StatusCode, resp.Status)
if resp.StatusCode == http.StatusOK {
responseBody := new(bytes.Buffer)
responseBody.ReadFrom(resp.Body)
fmt.Println("Response Body:", responseBody.String())
} else {
fmt.Println("Request failed.")
}
}
const axios = require('axios');
const url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple';
const headers = {
'accept': '*/*',
'access-key-token': 'Access Key Token',
'access-key-id': 'Access Key Id',
'Content-Type': 'application/json'
};
const data = {
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
};
axios.post(url, data, { headers })
.then(response => {
console.log("Response Code:" , response.status);
console.log("Response Body:", response.data);
})
.catch(error => {
console.error(error);
});
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple";
var headers = new System.Net.Http.Headers.HttpRequestHeaders();
headers.Add("accept", "*/*");
headers.Add("access-key-token", "Access Key Token");
headers.Add("access-key-id", "Access Key Id");
headers.Add("Content-Type", "application/json");
var data = new
{
phoneCode = "Client Phone Country Code",
phoneNumber = "Client Phone Number",
senderId = "Your Activate SenderId",
message = "Message Content"
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Clear();
client.DefaultRequestHeaders.AddHeaders(headers);
var jsonContent = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, jsonContent);
Console.WriteLine($"Response Code: {(int)response.StatusCode} {response.ReasonPhrase}");
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response Body:");
Console.WriteLine(responseContent);
}
else
{
Console.WriteLine("Request failed.");
}
}
}
}
package main
import (
"bytes"
"fmt"
"net/http"
"encoding/json"
)
func main() {
url := "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple"
headers := map[string]string{
"accept": "*/*",
"access-key-token": "Access Key Token",
"access-key-id": "Access Key Id",
"Content-Type": "application/json",
}
data := map[string]interface{}{
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content",
}
jsonData, err := json.Marshal(data)
if err != nil {
fmt.Println("Error marshaling JSON data:", err)
return
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
for key, value := range headers {
req.Header.Set(key, value)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
fmt.Printf("Response Code: %d %s", resp.StatusCode, resp.Status)
if resp.StatusCode == http.StatusOK {
responseBody := new(bytes.Buffer)
responseBody.ReadFrom(resp.Body)
fmt.Println("Response Body:", responseBody.String())
} else {
fmt.Println("Request failed.")
}
}
curl -X 'POST' 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple'
-H 'accept: */*'
-H 'access-key-token: Access Key Token'
-H 'access-key-id: Access Key Id'
-H 'Content-Type: application/json'
-d '{
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
}'
require 'net/http'
require 'uri'
require 'json'
url = URI.parse('https://mooping-openapi.thaidata.cloud/v1.1/sms-simple')
headers = {
'accept' => '*/*',
'access-key-token' => 'Access Key Token',
'access-key-id' => 'Access Key Id',
'Content-Type' => 'application/json'
}
data = {
"phoneCode" => "Client Phone Country Code",
"phoneNumber" => "Client Phone Number",
"senderId" => "Your Activate SenderId",
"message" => "Message Content"
}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = (url.scheme == 'https')
request = Net::HTTP::Post.new(url.path, headers)
request.body = data.to_json
response = http.request(request)
puts "Response Code: #{response.code}"
puts "Response Body: #{response.body}"
import requests
import json
url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple'
headers = {
'accept': '*/*',
'access-key-token': 'Access Key Token',
'access-key-id': 'Access Key Id',
'Content-Type': 'application/json'
}
data = {
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(f"Response Code: {response.status_code}")
print("Response Body:", response.text)
<?php
$url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple';
$headers = array(
'accept: */*',
'access-key-token: Access Key Token',
'access-key-id: Access Key Id',
'Content-Type: application/json'
);
$data = array(
"phoneCode" => "Client Phone Country Code",
"phoneNumber" => "Client Phone Number",
"senderId" => "Your Activate SenderId",
"message" => "Message Content"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
}
curl_close($ch);
echo "Response Code: " . http_response_code() . " ";
echo "Response Body: " . $response . " ";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class HttpClientExample {
public static void main(String[] args) {
try {
String url = "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple";
URL obj = new URL(url);
HttpURLConnection connection = (HttpURLConnection) obj.openConnection();
// Set the HTTP POST method
connection.setRequestMethod("POST");
// Set request headers
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("access-key-token", "Access Key Token");
connection.setRequestProperty("access-key-id", "Access Key Id");
connection.setRequestProperty("Content-Type", "application/json");
// Enable input/output streams
connection.setDoOutput(true);
connection.setDoInput(true);
// JSON data to send
String jsonData = "{" +
"phoneCode": "Client Phone Country Code"," +
"phoneNumber": "Client Phone Number"," +
"senderId": "Your Activate SenderId"," +
"message": "Message Content"" +
"}";
// Send POST data
try (DataOutputStream wr = new DataOutputStream(connection.getOutputStream())) {
wr.writeBytes(jsonData);
wr.flush();
}
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("Response Body: " + response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
const axios = require('axios');
const url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple';
const headers = {
'accept': '*/*',
'access-key-token': 'Access Key Token',
'access-key-id': 'Access Key Id',
'Content-Type': 'application/json'
};
const data = {
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
};
axios.post(url, data, { headers })
.then(response => {
console.log("Response Code:" , response.status);
console.log("Response Body:", response.data);
})
.catch(error => {
console.error(error);
});
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple";
var headers = new System.Net.Http.Headers.HttpRequestHeaders();
headers.Add("accept", "*/*");
headers.Add("access-key-token", "Access Key Token");
headers.Add("access-key-id", "Access Key Id");
headers.Add("Content-Type", "application/json");
var data = new
{
phoneCode = "Client Phone Country Code",
phoneNumber = "Client Phone Number",
senderId = "Your Activate SenderId",
message = "Message Content"
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Clear();
client.DefaultRequestHeaders.AddHeaders(headers);
var jsonContent = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, jsonContent);
Console.WriteLine($"Response Code: {(int)response.StatusCode} {response.ReasonPhrase}");
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response Body:");
Console.WriteLine(responseContent);
}
else
{
Console.WriteLine("Request failed.");
}
}
}
}
package main
import (
"bytes"
"fmt"
"net/http"
"encoding/json"
)
func main() {
url := "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple"
headers := map[string]string{
"accept": "*/*",
"access-key-token": "Access Key Token",
"access-key-id": "Access Key Id",
"Content-Type": "application/json",
}
data := map[string]interface{}{
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content",
}
jsonData, err := json.Marshal(data)
if err != nil {
fmt.Println("Error marshaling JSON data:", err)
return
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
for key, value := range headers {
req.Header.Set(key, value)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
fmt.Printf("Response Code: %d %s", resp.StatusCode, resp.Status)
if resp.StatusCode == http.StatusOK {
responseBody := new(bytes.Buffer)
responseBody.ReadFrom(resp.Body)
fmt.Println("Response Body:", responseBody.String())
} else {
fmt.Println("Request failed.")
}
}
const axios = require('axios');
const url = 'https://mooping-openapi.thaidata.cloud/v1.1/sms-simple';
const headers = {
'accept': '*/*',
'access-key-token': 'Access Key Token',
'access-key-id': 'Access Key Id',
'Content-Type': 'application/json'
};
const data = {
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content"
};
axios.post(url, data, { headers })
.then(response => {
console.log("Response Code:" , response.status);
console.log("Response Body:", response.data);
})
.catch(error => {
console.error(error);
});
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple";
var headers = new System.Net.Http.Headers.HttpRequestHeaders();
headers.Add("accept", "*/*");
headers.Add("access-key-token", "Access Key Token");
headers.Add("access-key-id", "Access Key Id");
headers.Add("Content-Type", "application/json");
var data = new
{
phoneCode = "Client Phone Country Code",
phoneNumber = "Client Phone Number",
senderId = "Your Activate SenderId",
message = "Message Content"
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Clear();
client.DefaultRequestHeaders.AddHeaders(headers);
var jsonContent = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, jsonContent);
Console.WriteLine($"Response Code: {(int)response.StatusCode} {response.ReasonPhrase}");
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response Body:");
Console.WriteLine(responseContent);
}
else
{
Console.WriteLine("Request failed.");
}
}
}
}
package main
import (
"bytes"
"fmt"
"net/http"
"encoding/json"
)
func main() {
url := "https://mooping-openapi.thaidata.cloud/v1.1/sms-simple"
headers := map[string]string{
"accept": "*/*",
"access-key-token": "Access Key Token",
"access-key-id": "Access Key Id",
"Content-Type": "application/json",
}
data := map[string]interface{}{
"phoneCode": "Client Phone Country Code",
"phoneNumber": "Client Phone Number",
"senderId": "Your Activate SenderId",
"message": "Message Content",
}
jsonData, err := json.Marshal(data)
if err != nil {
fmt.Println("Error marshaling JSON data:", err)
return
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
for key, value := range headers {
req.Header.Set(key, value)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
fmt.Printf("Response Code: %d %s", resp.StatusCode, resp.Status)
if resp.StatusCode == http.StatusOK {
responseBody := new(bytes.Buffer)
responseBody.ReadFrom(resp.Body)
fmt.Println("Response Body:", responseBody.String())
} else {
fmt.Println("Request failed.")
}
}
Efficiency and stability
มีความน่าเชื่อถือ ให้บริการแบบ Operation and Maintenance (O&M) จัดส่งข้อความได้ทั่วโลก ติดตามผลการส่งได้แบบ Real-time
Easy integration
SDKs และ APIs พร้อมใช้งานร่วมกับภาษาโปรแกรมเมอร์ต่างๆ ง่ายต่อการ Integrate ลดระยะเวลาและต้นทุนในการพัฒนาโปรแกรม
High performance
รองรับการตั้งเวลาส่งอัจฉริยะ (Schedule Campaign) ข้อความจะถูกส่งไปยังปลายทางด้วยอัตราความสำเร็จสูง แม้ในช่วงเวลาเร่งด่วน
Messaging analytics
อัลกอริทึม AI เพื่อเพิ่มประสิทธิภาพ ได้รับข้อมูลเชิงลึกในการส่งข้อความเพื่อการตัดสินใจทางธุรกิจรวมถึงการวิจัยการตลาดอย่างชาญฉลาด
Global Coverage
ช่องทางการสื่อสารที่มีประสิทธิภาพระหว่างองค์กรและลูกค้าครอบคลุม 200 ประเทศทั่วโลก
ทดลองส่งข้อความฟรี- Categories:
- Cloud
- Tags:
- Cloud
- Cloud Server
หมวดหมู่ที่น่าสนใจ
- Account Settings
- AD Server
- AI
- Alibaba Cloud
- Anti-Spam Gateway
- AWS Amazon Web Services
- Campaign
- CentOS/AlmaLinux
- Cloud
- Cloud Backup
- Cloud Communication
- Cloud Migration
- Cloud Security
- Cloud Server Management
- Cloud Solution
- Cloud Solution for Government
- Cloud Solutions by Industry
- Cloud Storage
- Cloud VPS App Plus +
- Cloud VPS DirectAdmin
- Cloud VPS Plesk
- CSR
- Cyber Security
- Cybersecurity
- Data Sovereignty
- Database Server
- DDoS
- Digital Tranformation
- Digital Transformation
- Direct Mail
- Directadmin
- Domainname
- Ecommerce
- ERP
- Generative AI
- Getting Started
- Google Cloud
- Google G Suite
- Huawei Cloud
- IT News
- Linux Server
- Managed Cloud Services
- Managed Service Provider
- Manual
- Microsoft
- Microsoft 365
- Microsoft Azure
- News
- On-premise
- Private Mail Server
- Promotion
- Recommend Solution (Enterprise)
- Server
- Sovereign Cloud
- THAI DATA CLOUD Platform
- Ubuntu
- Ubuntu
- Uncategorized
- VMware
- VPS Server
- Web Design
- Web Hosting
- Web Hosting (DirectAdmin)
- Web Hosting (Plesk)
- Web Technologies
- Windows Server
- Wordpress
- Zimbra
- เรื่องราวความประทับใจ
- โซลูชันสำหรับธุรกิจการผลิตและยานยนต์
- โซลูชันสำหรับธุรกิจการศึกษา
- โซลูชันสำหรับธุรกิจการเงิน
- โซลูชันสำหรับธุรกิจขนส่งและกระจายสินค้า
- โซลูชันสำหรับธุรกิจค้าปลีก
- โซลูชันสำหรับธุรกิจท่องเที่ยว
- โซลูชันสำหรับธุรกิจบริการสุขภาพและโรงพยาบาล
- โซลูชันสำหรับธุรกิจประกันภัย
- โซลูชันสำหรับธุรกิจพลังงานและสาธารณูปโภค
- โซลูชันสำหรับธุรกิจสื่อสารมวลชนและเอ็นเตอร์เทนเมนท์
- โซลูชันสำหรับธุรกิจอสังหาริมทรัพย์
- โซลูชันสำหรับธุรกิจเทคโนโลยี








