Complete reference for Ozibus APIs, SDKs, and integration guides
Welcome to this comprehensive guide on integrating SMS functionality into your applications. In this documentation, we'll explore various methods and tools for sending SMS messages programmatically, catering to developers working with different programming languages and platforms. Whether you're using PHP, Python, Node.js, or any other language, you'll find a suitable approach to incorporate SMS capabilities into your applications, facilitating effective communication with your users via text messages.
Prerequisites:
Before we begin, ensure you have the following prerequisites in place:
Step-by-Step Guide:
This documentation provides a flexible and adaptable approach to integrating SMS functionality into your applications, catering to developers working with different programming languages and platforms. By following the outlined steps and leveraging the available tools and libraries in your chosen language, you can seamlessly incorporate SMS capabilities into your applications, enhancing communication and engagement with your users through text messaging.
Request to /v1/sms
| Name | Description | Required |
|---|---|---|
| Authorization | Bearer YOUR_API_KEY | Yes |
| API-Key | YOUR_API_KEY | Yes |
| Merchant-Id | YOUR_MERCHANT_ID | Yes |
| Content-Type | application/json | Yes |
| Parameter | Type | Description | Required |
|---|---|---|---|
| to | number | Recipient phone number in E.164 format | Yes |
| from | number | Sender phone number or alphanumeric ID | Yes |
| message | string | Message content | Yes |
curl --location 'https://api.ozibus.com.au/v1/sms' \
--header 'Content-Type: application/json' \
--header 'API-Key: <YOUR_API_KEY>' \
--header 'Merchant-Id: <YOUR_MERCHANT_ID>' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--data '{
"to":"+12345678901",
"from":"+12513091299",
"message": "Hello! Good morning from here.."
}'<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.ozibus.com.au/v1/sms',
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 =>'{
"to":"+12345678901",
"from":"+12513091299",
"message": "Hello! Good morning from here.."
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'API-Key: <YOUR_API_KEY>',
'Merchant-Id: <YOUR_MERCHANT_ID>',
'Authorization: Bearer <YOUR_JWT_TOKEN>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'API-Key' => '<YOUR_API_KEY>',
'Merchant-Id' => '<YOUR_MERCHANT_ID>',
'Authorization' => 'Bearer <YOUR_JWT_TOKEN>'
];
$body = '{
"to": "+12345678901",
"from": "+12513091299",
"message": "Hello! Good morning from here.."
}';
$request = new Request('POST', 'https://api.ozibus.com.au/v1/sms', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
const axios = require('axios');
let data = JSON.stringify({
"to": "+12345678901",
"from": "+12513091299",
"message": "Hello! Good morning from here.."
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'http://localhost/messaging/api/sms',
headers: {
'Content-Type': 'application/json',
'API-Key': '<YOUR_API_KEY>',
'Merchant-Id': '<YOUR_MERCHANT_ID>',
'Authorization': 'Bearer <YOUR_JWT_TOKEN>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
curl --location 'https://api.ozibus.com.au/v1/sms' \
--header 'Content-Type: application/json' \
--header 'API-Key: <YOUR_API_KEY>' \
--header 'Merchant-Id: <YOUR_MERCHANT_ID>' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--data '{
"to":"+12345678901",
"from":"+12513091299",
"message": "Hello! Good morning from here.."
}'Join thousands of developers using Ozibus APIs to power their applications.
Get Started for Free