Developer
Implement comprehensive messaging services into your software by using simple APIs.
curl https://gateway.seven.io/api/sms \
-H "authorization: Basic INSERT_YOUR_API_KEY" \
-d "to=4917612121212" \
-d "text=Hello, this is a test SMS" \
-d "from=sender"
<?php
$ch = curl_init('https://gateway.seven.io/api/sms');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'to' => '4917612121212,Peter,FriendsGroup',
'text' => 'Hello, this is a test SMS',
'from' => 'sender'
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Accept: application/json',
'Content-type: application/json',
'X-Api-Key: INSERT_YOUR_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
var_dump($result);
<?php
use Sms77\Api\Client;
use Sms77\Api\Params\SmsParams;
$client = new Client('INSERT_YOUR_API_KEY');
$smsParams = new SmsParams;
$smsParams
->setTo('+4901234567890')
->setText('HI2U');
$client->sms($smsParams);
Are you working with Symfony? Check out the notifier component. It makes sending SMS via seven easy! You may also want to have a look at the official repository in case you wish to contribute or simply watch the project process.
Are you building your application with the very popular framework Laravel? Some nice people made the work integrating our service into Laravel Notification Channels. The package greatly reduces a developers workload and just works flawless. You download and read more about it here.
import java.net.*;
import java.io.*;
public class sms {
public static void main(String[] args) {
String urlString = "https://gateway.seven.io/api/sms/?p=apikey&to=...&text=....&from=...";
String output = getUrlContents(urlString);
System.out.println(output);
}
private static String getUrlContents(String theUrl)
{
StringBuilder content = new StringBuilder();
// many of these calls can throw exceptions, so i've just
// wrapped them all in one try/catch statement.
try
{
// create a url object
URL url = new URL(theUrl);
// create a urlconnection object
URLConnection urlConnection = url.openConnection();
// wrap the urlconnection in a bufferedreader
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(urlConnection.getInputStream())
);
String line;
// read from the urlconnection via the bufferedreader
while ((line = bufferedReader.readLine()) != null)
{
content.append(line + "n");
}
bufferedReader.close();
}
catch(Exception e)
{
e.printStackTrace();
}
return content.toString();
}
}
For implementation with Ruby, you can use our Gem.
require 'sms77'
puts Sms77::Client.new(Sms77::Resource(ENV['SMS77_API_KEY'])).Balance.retrieve
# or
puts Sms77::Resources::Balance.new(ENV['SMS77_API_KEY']).retrieve
We provide a client for our API for better usability. It is also available via the central package distribution system NuGet.
using System;
using System.Threading.Tasks;
using Client = Sms77.Api.Client;
class Program
{
static async Task Main()
{
var apiKey = Environment.GetEnvironmentVariable("SMS77_API_KEY");
var client = new Client(apiKey);
var balance = await client.Balance();
Console.WriteLine($"Current account balance: {balance}");
}
}
For easier usability we are providing a client for our API. You can read more about it at pkg.go.dev.
package main
import (
"fmt"
"github.com/sms77io/go-client/sms77api"
)
func main() {
var client = sms77api.New(sms77api.Options{
ApiKey: "InsertSuperSecretSms77ApiKey!",
})
var balance, err = client.Balance.Get()
if err == nil {
fmt.Println(fmt.Sprintf("%f", *balance))
} else {
fmt.Println(err.Error())
}
}
We deliver a client for our API for better accessibility. It is distributed as a NPM package.
// const globalThis = require('globalthis')(); // uncomment if NodeJS < NodeJS versions < 12
globalThis.fetch = require('node-fetch').default;
const Sms77Client = require('sms77-client');
<script src="https://unpkg.com/browse/sms77-client/dist/Sms77Client.umd.js"></script>
new Sms77Client("INSERT_SMS77_API_KEY")
.balance()
.then(balance => console.log(`Current balance: ${balance}`))
.catch(console.error);
# If your API key is not set as environment variable named "SMS77_API_KEY":
# Application.put_env(:sms77, :api_key, "INSERT_YOUR_SMS77_API_KEY")
IO.puts Sms77.Balance.get! # prints the account balance to console
We developed a SDK in Rust for convenience reasons. You can download it via crates.io. The source code is available on GitHub. Feel free to open issues or even come up with a pull request on your own.
let apiKey = "INSERT_YOUR_API_KEY".to_string();
let client = Client::new(apiKey);
let balance = Balance::new(client).get().unwrap();
println!("Current balance: {}", balance);
Use this convenient code snippet for quickly send a SMS via a Perl script.
#!/usr/bin/perl
use LWP::UserAgent;
my %form;
$form{'p'} = 'HeJyJSAvBWDn5RwNfhQGKZI6poCLk7pUXjpxctipYHWGsjoHtWNDI3d4De8gkoVe'; # Your API key
$form{'from'} = 'seven'; # Caller ID
$form{'text'} = 'Bless you!'; # Message content
$form{'to'} = '+491771783130'; # Recipient(s)
my $ua = LWP::UserAgent->new();
my $response = $ua->post('https://gateway.seven.io/api/sms', \%form );
my $content = $response->as_string();
print($content);
Your software sends a request to our SMS gateway
Our SMS gateway checks the request, returns a response code and hands over the SMS to the carrier
The SMS will be delivered within seconds
By using the simplest HTTP GET Request, developers can integrate our SMS solutions into your application in just a few minutes. You control your processes by adding various parameters for the SMS transmission. This means that you’re able to use all of our features when sending SMS via API.
Do you have any questions? We are happy to help you with the realization of your projects.