Overview
Telecom Lookup Tools
Sending - w/ URL
This will help you send an MMS message if the media you want to send us located at a URL.

Post/Get Information

URL:
Argument
Required
Type
source
yes
int
destination
yes
int
file_url
yes
string
message
no
string
shell
PHP+CURL
PHP+PLAIN
RESPONSE
Shell/CURL
Note: Be sure to convert / in your image url to %2F (urlencoded)
1
curl -v -X POST "https://api.teleapi.net/mms/send?token=XXXX" \
2
-d "source=13035551212&destination=13038884444&file_url=http%3A%2F%2Fsample.s3.amazon.com%2Ffile.jpg"
Copied!
PHP + CURL
1
<?php
2
$file_url = urlencode("http://sample.s3.amazon.com/file.jpg");
3
​
4
$data = array("source" => "13035551212",
5
"destination" => "13038884444",
6
"file_url" => $file_url
7
);
8
​
9
$data = http_build_query($data);
10
​
11
$baseurl = "https://api.teleapi.net/mms/send?token=XXXX";
12
curl_setopt($ch, CURLOPT_POST, 1);
13
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
14
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
15
$retval = curl_exec($ch);
16
curl_close($ch);
17
​
18
$object = json_decode($retval);
19
print_r($object);
Copied!
PHP - file_get_contents
1
<?php
2
$file_url = urlencode("http://sample.s3.amazon.com/file.jpg");
3
​
4
$data = array("source" => "13035551212",
5
"destination" => "13038884444",
6
"file_url" => $file_url
7
);
8
​
9
$data = http_build_query($data);
10
​
11
$url = "https://api.teleapi.net/mms/send?token=XXXX&".$data;
12
$url .= "&file_url=$file_url";
13
$x = file_get_contents($url);
14
$object = json_decode($x);
15
print_r($object);
Copied!

Responses from API

Successfully Sent

data
This is your unique tracking ID for this SMS message. You can track this in delivery notifications.
1
{
2
"code":200,
3
"status":"success",
4
"data":"ea19aa71-4590-4e6b-a8ce-47e2b84c8091"
5
}
Copied!

Failed to Send

1
{
2
"code":400,
3
"status":"error",
4
"data":"Invalid source number"
5
}
Copied!
Copy link