Retrieve Extended SMS Info
GetSMSByUUID
GET
https://api.opentact.org/rest/sms/outbound/{uuid}
This will get extended outbound SMS info.
Path Parameters
Name
Type
Description
uuid
string
Headers
Name
Type
Description
Authorization
string
JWT or Bearer
{
"success": true,
"payload": {
"state": "sending",
"created_on": "2020-10-27T16:33:05.928Z",
"modified_on": "2020-10-27T16:33:07.045Z",
"uuid": "6f837aa1-f6aa-45af-9764-3c4bfa84098f",
"to": "J Smith",
"thread": "fdbbf3c163f386c272ed1b75a1d898bf",
"message": "test message",
"delivered": false,
"automated": false,
"reference_id": "yRUCycblUjwqpkMBwPbJf4",
"custom_callback_url": "www.example.com",
"tn": {
"created_on": "2020-10-27T16:30:48.249Z",
"modified_on": "2020-10-27T16:30:49.593Z",
"tn": 12013046585,
"deleted_on": null,
"voice": false,
"fax": false,
"sms": true,
"mms": false,
"emergency": false,
"registered": true
},
"account": {
"created_on": "2020-10-26T08:44:15.621Z",
"modified_on": "2020-10-26T08:44:15.914Z",
"uuid": "cfb6fe69-d7b2-4e66-bc23-872a2baf3b00",
"email": "user@mail.co.uk",
"name": "John Smith",
"level": "Level0",
"deleted_on": null,
"balance": 3.24,
"class4_id": 268
},
"created_by": {
"created_on": "2020-10-26T08:44:15.621Z",
"modified_on": "2020-10-26T08:44:16.023Z",
"uuid": "60e9fa76-20e7-45ee-bf24-8c4a95143dad",
"email": "user@mail.co.uk",
"phone_number": null,
"first_name": "John",
"last_name": "Smith",
"dob": null,
"gmail_user_id": "107653031006300523703",
"facebook_user_id": null,
"apple_user_id": null,
"wechat_user_id": null,
"role": "User",
"gender": null,
"deleted_on": null
}
}
}
{
"success": true,
"message": "string",
"status": 0
}
{
"success": true,
"message": "string",
"status": 0
}
Code Example
curl -X GET "https://api.opentact.org/rest/sms/outbound/{uuid}" \
-H "accept: application/json" -H "X-Auth-Token:JWT_TOKEN"
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'accept' => 'application/json',
'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::get('https://api.opentact.org/rest/sms/outbound/{uuid}', $headers);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
}
response = requests.get('https://api.opentact.org/rest/sms/outbound/%7Buuid%7D', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/sms/outbound/{uuid}', {
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN'
}
});
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.opentact.org/rest/sms/outbound/{uuid}", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-Auth-Token", "JWT_TOKEN")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
GetSMSIByUUID
GET
https://api.opentact.org/rest/sms/inbound/{uuid}
This will get extended inbound SMS info.
Path Parameters
Name
Type
Description
uuid
string
Headers
Name
Type
Description
Authorization
string
JWT or Bearer
{
"success": true,
"payload": {
"created_on": "2019-08-24T14:15:22Z",
"modified_on": "2019-08-24T14:15:22Z",
"uuid": "string",
"tn": {},
"tnlease": {},
"to": "string",
"from": "string",
"thread": "stringstringstringstringstringstr",
"message": "string",
"provider_event": {},
"state": "created",
"delivered": true,
"readed": true,
"account": {}
}
}
{
"success": false,
"message": "string",
"status": 0
}
{
"success": false,
"message": "SMS not found",
"status": "404"
}
Code Example
curl -X GET "https://api.opentact.org/rest/sms/inbound/{uuid}" \
-H "accept: application/json" -H "X-Auth-Token:JWT_TOKEN"
Last updated
Was this helpful?