curl --location --request GET 'https://api.sempico.solutions/send?token=di5B9xXcZeULyNAFSsdv9COWOzBPWD&phone=441316080906&senderID=Sempico&text=Hello%20world' \
--header 'Content-Type: application/json' \
--header 'charset: UTF-8'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.sempico.solutions/send?token=di5B9xXcZeULyNAFSsdv9COWOzBPWD&phone=441316080906&senderID=Sempico&text=Hello%2520world',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'charset: UTF-8'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.sempico.solutions/send?token=di5B9xXcZeULyNAFSsdv9COWOzBPWD&phone=441316080906&senderID=Sempico&text=Hello%2520world"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("charset", "UTF-8")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var settings = {
"url": "https://api.sempico.solutions/send?token=di5B9xXcZeULyNAFSsdv9COWOzBPWD&phone=441316080906&senderID=Sempico&text=Hello%20world",
"method": "GET",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"charset": "UTF-8"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import requests
import json
url = "https://api.sempico.solutions/send?token=di5B9xXcZeULyNAFSsdv9COWOzBPWD&phone=441316080906&senderID=Sempico&text=Hello%20world"
payload={}
headers = {
'Content-Type': 'application/json',
'charset': 'UTF-8'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.sempico.solutions/send?token=di5B9xXcZeULyNAFSsdv9COWOzBPWD&phone=441316080906&senderID=Sempico&text=Hello%20world")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["charset"] = "UTF-8"
response = https.request(request)
puts response.read_body
curl --location --request POST 'https://restapi.sempico.solutions/v1/send' \
--header 'X-Access-Token: 193aeb655c4c34c4fcd3d9516eeb0cf1' \
--header 'Content-Type: application/json' \
--header 'charset: UTF-8' \
--data-raw '[{
"number":["12345678912"],
"senderID":"Sempico",
"text":"Hello\n are you?",
"type":"sms",
"beginDate":"2022-08-31",
"beginTime":"11:00",
"lifetime":555,
"delivery":false
},
{
"number":["12345678910","12345678911"],
"senderID":"Sempico",
"text":"Hello\nHow are you too?",
"type":"sms",
"beginDate":"2022-08-31",
"beginTime":"11:00",
"lifetime":555,
"delivery":false
}]'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://restapi.sempico.solutions/v1/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 =>'[{
"number":["12345678912"],
"senderID":"Sempico",
"text":"Hello\\n are you?",
"type":"sms",
"beginDate":"2022-08-31",
"beginTime":"11:00",
"lifetime":555,
"delivery":false
},
{
"number":["12345678910","12345678911"],
"senderID":"Sempico",
"text":"Hello\\How are you too?",
"type":"sms",
"beginDate":"2022-08-31",
"beginTime":"11:00",
"lifetime":555,
"delivery":false
}]',
CURLOPT_HTTPHEADER => array(
'X-Access-Token: 193aeb655c4c34c4fcd3d9516eeb0cf1',
'Content-Type: application/json',
'charset: UTF-8'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://restapi.sempico.solutions/v1/send"
method := "POST"
payload := strings.NewReader([{+
"number":["12345678912"],`+
"senderID":"Sempico",`+
"text":"Hello\n are you?",`+
"type":"sms",`+
"beginDate":"2022-08-31",`+
"beginTime":"11:00",`+
"lifetime":555,`+
"delivery":false`+
},`+
{`+
"number":["12345678910","12345678911"],`+
"senderID":"Sempico",`+
"text":"Hello\nHow are you too?",`+
"type":"sms",`+
"beginDate":"2022-08-31",`+
"beginTime":"11:00",`+
"lifetime":555,`+
"delivery":false`+
}]`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-Access-Token", "193aeb655c4c34c4fcd3d9516eeb0cf1")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("charset", "UTF-8")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var settings = {
"url": "https://restapi.sempico.solutions/v1/send",
"method": "POST",
"timeout": 0,
"headers": {
"X-Access-Token": "193aeb655c4c34c4fcd3d9516eeb0cf1",
"Content-Type": "application/json",
"charset": "UTF-8"
},
"data": JSON.stringify([
{
"number": [
"12345678912"
],
"senderID": "Sempico",
"text": "Hello\n are you?",
"type": "sms",
"beginDate": "2022-08-31",
"beginTime": "11:00",
"lifetime": 555,
"delivery": false
},
{
"number": [
"12345678910",
"12345678911"
],
"senderID": "Sempico",
"text": "Hello\nHow are you too?",
"type": "sms",
"beginDate": "2022-08-31",
"beginTime": "11:00",
"lifetime": 555,
"delivery": false
}
]),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import requests
import json
url = "https://restapi.sempico.solutions/v1/send"
payload = json.dumps([
{
"number": [
"12345678912"
],
"senderID": "Sempico",
"text": "Hello\n are you?",
"type": "sms",
"beginDate": "2022-08-31",
"beginTime": "11:00",
"lifetime": 555,
"delivery": False
},
{
"number": [
"12345678910",
"12345678911"
],
"senderID": "Sempico",
"text": "Hello\nHow are you too?",
"type": "sms",
"beginDate": "2022-08-31",
"beginTime": "11:00",
"lifetime": 555,
"delivery": False
}
])
headers = {
'X-Access-Token': '193aeb655c4c34c4fcd3d9516eeb0cf1',
'Content-Type': 'application/json',
'charset': 'UTF-8'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://restapi.sempico.solutions/v1/send")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Token"] = "193aeb655c4c34c4fcd3d9516eeb0cf1"
request["Content-Type"] = "application/json"
request["charset"] = "UTF-8"
request.body = JSON.dump([
{
"number": [
"12345678912"
],
"senderID": "Sempico",
"text": "Hello\n are you?",
"type": "sms",
"beginDate": "2022-08-31",
"beginTime": "11:00",
"lifetime": 555,
"delivery": false
},
{
"number": [
"12345678910",
"12345678911"
],
"senderID": "Sempico",
"text": "Hello\nHow are you too?",
"type": "sms",
"beginDate": "2022-08-31",
"beginTime": "11:00",
"lifetime": 555,
"delivery": false
}
])
response = https.request(request)
puts response.read_body