Reserve Keyword API can be accessed via HTTPS thru the following URL:
https://api.protexting.com/addkeyword.php
The following text parameters are available:
(can be passed via POST or GET)
• All parameters are required!
Option 1 (using username and password)
user |
your ProTexting username |
password
|
your ProTexting password |
keyword | keyword to be reserved |
autoreplymessage | (optional) Auto Reply Message |
Option 2 (using key parameter – recommended)
key
|
your ProTexting Security Key |
keyword | keyword to be reserved |
autoreplymessage | (optional) Auto Reply Message |
Instructions for the message:
Reserve Keyword API call return codes:
* Negative code represent failure to send message
1
|
The keyword is available |
0
|
The keyword is not available |
-2
|
Invalid user or password |
-3
|
Incorrect keyword format: Keyword should contains only letters and digits. Total number of characters must be between 4 and 50 |
-4
|
There is no keyword credits |
-5
|
Invalid Auto Reply Message: message exceeds 135 characters or invalid characters. Please review our list of Allowed Characters |
-8
|
Your IP address is not allowed |
-9
|
There are forbidden words included in the message, please review our list of Forbidden Words and Phrases |
-100
|
Unknown error |
API Reserve Keyword Examples:
Option 1 – EXAMPLE - (using username and password)
PHP
$ch=curl_init('https://api.protexting.com/addkeyword.php');
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt$ch,CURLOPT_POSTFIELDS,"user=username&password=password&keyword=mykeyword&autoreplymessage=Hello");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$data = curl_exec($ch);
echo $data;
/* result of API call*/
?>
Option 2 – EXAMPLE - (using key parameter – recommended)
PHP
$ch=curl_init('https://api.protexting.com/addkeyword.php');
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt$ch,CURLOPT_POSTFIELDS,"key=yourapikey&keyword=mykeyword&autoreplymessage=Hello");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$data = curl_exec($ch);
echo $data;
/* result of API call*/
?>