Club Texting Bulk SMS Text Messaging API:

Club Texting provides API via HTTP/ Internet Post.

The API calls can be made from nearly all popular programming language. We provide examples below in PHP and C#. You must first register an account to be able to use the API.  To activate the API for your account please submit a support ticket with the username of your account.

If you are interested in performing a carrier lookup by phone number, please see our Cellular Carrier Lookup API documentation.



Sending SMS Messages Via API:

The text (sms) message sending API may be accessed via an HTTP call to the following web service URL:
https://app.clubtexting.com/apisendmessage.php

Parameters (may be passed via GET or POST and values must be properly URL encoded)

User
(Required) Your Club Texting Username
Pass
(Required) Your Club Texting Password
PhoneNumber (Required) 10 digit phone number to send message to.
Subject
(Required) The subject of your message (leave null if no subject)
Message
(Required) The body of your message (cannot exceed 130 characters and contain single or double quotes) (Express messages cannot exceed 160 characters)
Express (Optional) Use Express delivery method when sending message value = 1.  Click here to see the difference between Express & Standard delivery.
What's the difference between Standard & Express delivery?

The following are the codes that a send message API call can return. Any negative codes represent unsuccessful attempts to send messages.

1
Message Sent
-1
Invalid user or password (make sure your account is API allowed)
-2
Credit Limit Reached
-5
Local Opt Out (the recipient/number is on your opt-out list.)
-7
Invalid Message (message exceeds 130 characters (160 for express) or contains single or double quotes or other invalid characters - see a list of valid characters below this table)
-104
Globally Opted Out Phone Number (the phone number has been opted out from all messages sent from our short code)
-106
Incorrectly Formatted Phone Number (number must be 10 or 11 digits)
-10
Unknown Error (please contact our support dept.)

Please Note:  Our servers impose a limit on the number of connections that you may make from your server to ours per minute.  To avoid having your IP blocked, please do not attempt to make more than 120 HTTP connections per minute to our servers.  Please also make sure that you close each connection after opening one and making your HTTP request.  If you are running a multithreaded application please also be aware of the limit that is imposed.

The list of allowed characters for messages and subjects is: a-z, A-Z, 0-9 and these special characters: .,:;!?()~=+-_\/@$#&%

The following characters count as two characters when used: ~ @ # % + = / \ \r\n

API Text Message Sending Language Examples:

PHP

<?php<br>$ch=curl_init('https://app.clubtexting.com/apisendmessage.php');
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt$ch,CURLOPT_POSTFIELDS,"user=username&pass=userpassword&phonenumber= 2127846500&subject=test&message=test message&express=0");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
print($data); /* result of API call*/
?>

C#

string ret=string.Empty;
WebRequest w=WebRequest.Create("https://app.clubtexting.com/apisendmessage.php");
w.Method="POST";
w.ContentType="application/x-www-form-urlencoded";
using(Stream writeStream = w.GetRequestStream())
{
UTF8Encoding encoding = new UTF8Encoding();
byte[] bytes = encoding.GetBytes("user=username&pass=userpassword&
phonenumber=2127846500&subject=test
&message=test message&express=1");
writeStream.Write(bytes, 0, bytes.Length);
}
using (HttpWebResponse r = (HttpWebResponse) w.GetResponse())
{
using (Stream responseStream = r.GetResponseStream())
{
using (StreamReader readStream = new StreamReader (responseStream, Encoding.UTF8))
{
ret = readStream.ReadToEnd();
}
}
}
MessageBox.Show(ret); /* result of API call*/

Receiving SMS Messages Via API

The club Texting SMS Server allows SMS messages to be received using HTTP through the means of keywords on our short code 25827 (or 212121 for Canada). This page details the format of the HTTP requests which are send by the club Texting SMS Server to allow the receipt of SMS text messages by external software systems.

The club Texting SMS Server will push received SMS messages by making an HTTP GET to the provided URL to indicate the receipt of an SMS message.  You can input this URL on the Keywords section of your club Texting account.

Example URL:
http://www.yourdomain.com/receivesms.php

Message Format
On receipt of an SMS we will send an HTTP GET request to your server, using the parameters included in the table below:

PhoneNumber 10 digit phone number message originated from.
Message
The body of your message that was texted in by the originating phone number prefaced by your keyword.

Example Request Sent:
http://www.yourdomain.com/receivesms.php?PhoneNumber=5554443333&Message=Hello%20my%20friend

Response To The Server
When the GET post is made to your server, your script must output your sms response in plain text format (max 130 characters or 160 for express) that will be sent back to the originating phone number through our 25827 (or 212121 for Canada) shared short code. This response must be given in a timely manner (sub 60 seconds) or it will be abandoned. No additional calls to our servers are necessary.

Receiving SMS Responses From Your Inbox
You may have replies that go into your Inbox sent to your server via the Forwarding option located on the left navigation of your clubtexting.com. You may specify a URL to send your responses to.


Check Amount of Credits Via API:

The amount of credits check API may be accessed via an HTTP call to the following web service URL:
https://app.clubtexting.com/apicheckcredits.php

Parameters (may be passed via GET or POST and values must be properly URL encoded)

User
(Required) Your club Texting Username
Pass
(Required) Your club Texting Password

The following are the codes that a send message API call can return. Any negative codes represent unsuccessful attempts to check credits amount.

Any non-negative number
The amount of credits available
-1
Invalid user or password (make sure your account is API allowed)
-10
Unknown Error (please contact our support dept.)


Check Keyword Availability Via API:

The keyword availability check API may be accessed via an HTTP call to the following web service URL:
https://app.clubtexting.com/apicheckkeyword.php

Parameters (may be passed via GET or POST and values must be properly URL encoded)

User
(Required) Your club Texting Username
Pass
(Required) Your club Texting Password
Keyword (Required) The keyword to be checked

The following are the codes that a send message API call can return. Any negative codes represent unsuccessful attempts to check keyword availability.

1
The keyword is available
0
The keyword is not available
-1
Invalid user or password (make sure your account is API allowed)
-10
Unknown Error (please contact our support dept.)


Buy More Credits Via API:

The credits purchasing API may be accessed via an HTTPS call to the following web service URL:
https://app.clubtexting.com/apibuycredits.php

Parameters (must be passed via POST and values must be properly URL encoded)

User
(Required) Your club Texting Username
Pass
(Required) Your club Texting Password
FirstName (Required) The first name on the card
LastName (Required) The last name on the card
Address (Required) The billing street address
City (Required) The billing address city
State (Required) The billing address state/province
Zip (Required) The billing address zip code
Country (Required) The billing address country
Type (Required) Card type: 'MC' for MasterCard, 'Visa', 'AX' for American Express, 'DS' for Discover, 'JCB'
CCNumber (Required) Card number
Expm (Required) Card's expiration month, two digits
Expy (Required) Card's expiration year, two digits
Credits (Required) Amount of credits to buy

The following are the codes that a send message API call can return. Any negative codes represent unsuccessful attempts to buy credits.

1
The request is succeed
0
The request is declined
-1
Invalid user or password (make sure your account is API allowed)
-10
Unknown Error (please contact our support dept.)


Rent a Keyword Via API:

The keyword rent API may be accessed via an HTTPS call to the following web service URL:
https://app.clubtexting.com/apirentkeyword.php

Parameters (must be passed via POST and values must be properly URL encoded)

User
(Required) Your club Texting Username
Pass
(Required) Your club Texting Password
FirstName (Required) The first name on the card
LastName (Required) The last name on the card
Address (Required) The billing street address
City (Required) The billing address city
State (Required) The billing address state/province
Zip (Required) The billing address zip code
Country (Required) The billing address country
Type (Required) Card type: 'MC' for MasterCard, 'Visa', 'AX' for American Express, 'DS' for Discover, 'JCB'
CCNumber (Required) Card number
Expm (Required) Card's expiration month, two digits
Expy (Required) Card's expiration year, two digits
Keyword (Required) The keyword to rent

Please note: After you rent a Keyword, you may want to update the default autoreply, which is 'Thank you for joining our list.'

The following are the codes that a send message API call can return. Any negative codes represent unsuccessful attempts to rent a keyword.

2
The request is succeed
1
The keyword is not available
0
The request is declined
-1
Invalid user or password (make sure your account is API allowed)
-10
Unknown Error (please contact our support dept.)


Setup a Keyword Via API:

The keyword setup API may be accessed via an HTTPS call to the following web service URL:
https://app.clubtexting.com/apisetupkeyword.php

Parameters (must be passed via GET or POST and values must be properly URL encoded)

User
(Required) Your Club Texting Username
Pass
(Required) Your Club Texting Password
Keyword (Required) Keyword that you want to setup
Group (Optional) Customers who text in your keyword will be added to the group you provide
Autoreply (Optional) Customers that text in your Keyword to 25827 will receive this message. Each confirmation return text that is sent back requires 2 credits. If you do not update this field, we will send out our default autoreply, 'Thank you for joining our list.'
Email (Optional) We will forward incoming messages to the email address for free
URL (Optional) We will call this URL when keyword is received

The following are the codes that a send message API call can return. Any negative codes represent unsuccessful attempts to rent a keyword.

1
Updated Successfully
-1
Invalid user or password (make sure your account is API allowed)
-2
Invalid Keyword
-3
Invalid Group Name
-4
Invalid Email
-5
Invalid URL
-10
Unknown Error (please contact our support dept)

 API Setup A Keyword Language Examples:

PHP

<?php
$ch=curl_init('https://app.clubtexting.com/apisetupkeyword.php');
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"user=username&pass=userpassword&group=test&url=http://test.com/test");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
print($data); /* result of API call*/
?>

 

Voice Broadcast Via API:

The voice broadcast API may be accessed via an HTTP call to the following web service URL:
https://app.clubtexting.com/apisendvoice.php

Parameters (may be passed via POST and values must be properly URL encoded)

User
(Required) Your club Texting Username
Pass
(Required) Your club Texting Password
Phonenumbers (Required) Array of 10 digit phone numbers to call to.
Soundfile
(Optional) Name of the .wav file in your club Texting account
Soundsource
(Optional) Address to the .wav file on your server
Callerid (Required) 10 digit phone number

You can either provide name of the file you saved in your club Texting account (Soundfile) or we can get your .wav file from the URL on your server (Soundsource).

The following are the codes that the voice broadcast API call can return. Any negative codes represent unsuccessful attempts to create broadcast.

1
Campaign Sent
-1
Invalid user or password (make sure your account is API allowed)
-2
Credit Limit Reached
-3
Invalid Callerid
-4
Invalid array of phone numbers
-5

Invalid Soundfile (make sure you provided the correct file name) 

-6
Invalid Soundsource (make sure you provided the correct path to the file)
-7

Invalid POST Request (make sure you use the correct names of variables)

-10
Unknown Error

 

API Voice Broadcast Language Examples:

PHP

<?php

$ch = curl_init('https://app.clubtexting.com/apisendvoice.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"user=username&pass=password&phonenumbers=
2127846500&soundsource=http://mydomain.com/sounds/voice.wav&callerid=2127847840");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
print($data); /* result of API call*/

?>

or

<?php

$ch = curl_init('https://app.clubtexting.com/apisendvoice.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"user=username&pass=password&phonenumbers=
2127846500&soundfile=1236019718.wav&callerid=2127847840");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
print($data); /* result of API call*/

?>

Forwarding API:

All replies to your inbox will be forwarding to the URL you specify. The Club Texting SMS Server will push received SMS messages by making an HTTP GET to the provided URL.
Example URL:
http://www.yourdomain.com/sms.php

Example Request Sent:
We will send an HTTP GET request to your server, using the parameters:

from
10 digit phone number message originated from.
message
The body of receiving message that was texted in by the originating phone number.

http://www.yourdomain.com/sms.php?from=5554443333&message=Hello%20World

Options:
Send unique request: Check this if you have both keyword URL and forwarding URLs setup and you do not wish to receive duplicate message forwards.
Wait for response from my server: If you require an incoming reply to have an auto-reply, select this option. We will send this response as an auto-reply via HTTP GET and charge 2 credits accordingly.

Please note: If you have a keyword and both the keyword URL and forwarding URLs are setup with the same URL, you should click "Send Unique Request" so we only send one GET request.

CUSTOMER LOGIN


LIVE SALES & SUPPORT


(Monday to Friday, 9am - 7pm EST)

CLUB TEXTING CLIENTS

Our Text Messaging Clients


CERTIFICATIONS

Member Of The Mobile Marketing Association

Click