Table of Contents
|
Bulletin Connect
Connection Types
Be Careful The information and samples here are for Bulletin Connect. If you have signed up on-line please see the Bulletin API documentation or contact Bulletin to apply for a Bulletin Connect Account. |
HTTP
HTTP is the recommended interface to develop against Bulletin SMPP. For additional security after debugging you can simply change to HTTPS (see below). |
HTTPS
HTTPS and HTTP can be used interchangeably but HTTPS provides additional security. |
SOAP
The SOAP interface has been deprecated and does not support the same feature set as the HTTP interface. It is recommended that where practical you use HTTP. |
SMPP
HTTP Overview
The Bulletin Connect HTTP interface is composed of three methods:
- To send messages
- To receive messages
- To receive receipts
Bulletin Connect Messaging REST URLs
Action (case sensitive) |
URL to Use |
---|---|
Sending Messages |
|
Polling for Incoming Messages |
|
Receiving Status Updates |
Sending Messages
Name (case sensitive) |
Description |
Required? |
---|---|---|
userId | User name for authentication | YES |
password | Password for authentication | YES |
to | Destination MSISDN(s) | YES Use International Format |
body | Message Payload | YES |
messageId | Client message identifier | Optional, (maximum 36 characters). Use this if you want to take advantage of Bulletin's patented mTAGTM technology or if you want to track message status information for retrying due to errors or delays. |
rateCode | Message source MSISDN specifier | Optional. Contact Bulletin for Premium Billing/Routing options |
from | Message source MSISDN, can not be used with rateCode | Optional. Contact Bulletin for this to be enabled on your account and for Premium Billing/Routing options |
contentType | The type of message | Optional. Used for WAP Push Service Indication, vCard, vCal messages and UTF-16 SMS messages. For UTF-16 SMS messages, this must be set to text/plain; charset=UTF-16. |
fragmentationLimit | Integer value between 0 and 3 | Optional. Sets maximum number of SMS message parts to use for #Multipart SMS Messages, default is 0 which indicates the current maximum (3) is used |
routingHint | Indicates preferred route for message | Optional. Contact Bulletin for this to be enabled on your account and further information |
schedule | Unix time for message delivery | Optional. Contact Bulletin for this feature to be enabled on your account |
Code |
Meaning |
Action Required |
---|---|---|
204 | Success! | No action required Note, if you use a browser to test your message syntax the browser will not show anything if you are successful. Only errors or warning will be displayed. |
400 | Bad Request | Examine the HTTP header value for Status-Line for further error information |
401 | Unauthorized | Check you are using the correct URL as well as userId and password values |
403 | Forbidden | Check available funds, Check the rateCode you use is correct (case sensitive) and that you are not setting a sender number in the request |
500 | Internal Error | Retry your message after a pause of no less than 30 seconds and if it continues please Contact Bulletin |
Listing Scheduled Messages
Name (case sensitive) |
Description |
Required? |
---|---|---|
userId | User name for authentication | YES |
password | Password for authentication | YES |
Code |
Meaning |
Action Required |
---|---|---|
200 | You have scheduled messages | Parse the CSV contained in the Body scheduledId,scheduled delivery time (unix timestamp), destinationMSISDN 00000000012345,1261088968,444122112112 00000000a32345,1261092968,444122115214
|
204 | You have no scheduled messages | No action required |
401 | Unauthorized | Check you are using the correct URL as well as userId and password values |
500 | Internal Error | Retry your request after a pause of no less than 30 seconds and if it continues please Contact Bulletin |
Deleting Scheduled Messages
Name (case sensitive) |
Description |
Required? |
---|---|---|
userId | User name for authentication | YES |
password | Password for authentication | YES |
ids | Space deliminated list of scheduled message IDs returned from the #Listing Scheduled Messages request | YES |
Code |
Description |
Notes |
---|---|---|
200 | Your scheduled messages have been deleted | Parse the urlencoded Body for the space delimited list of IDs that were deleted. |
204 | No scheduled messages were deleted | No action required |
401 | Unauthorized | Check you are using the correct URL as well as userId and password values. |
500 | Internal Error | Retry your request after a pause of no less than 30 seconds and if it continues please Contact Bulletin |
Setting Source Numbers using from Parameter
- a-z A-Z
- 0-9
- The source should have maximum of 11 characters
- Symbols are not allowed
- Replies are not available as they will not be routed back to your account.
- You must ensure that any legal obligations with regards to unsolicited messages or opt-out regulations are complied with as users will not be able to opt out by reply SMS.
- Some networks and handsets do not support Alpha source numbers so your message may not be delivered as expected.
Example GET Request
http://service.bulletinconnect.net/api/1/sms/in?userId=yourBulletinID&password=yourBulletinPassword
Example Mobile Initiated Message Content
body=Play+the+eagles+long+run&contentType=text%2Fplain&from=6149123456&messageId=000000000012dde9&rateCode=yourUniqueRateCode&to=4040
body=I+am+running+late+sorry&contentType=text%2Fplain&from=6421702659&inReplyToId=66071687&messageId=000000000012de7d
body=I+am+running+late+sorry&contentType=text%2Fplain&from=6421702659&inReplyToId=default&messageId=000000000012de7d
Receiving Messages
- You can either poll the server for incoming messages (pull method), or
- Have incoming messages sent (pushed) to your server as they are processed.
To Receive a Message
Name (case sensitive) |
Description |
Required? |
---|---|---|
userId | User name for authentication | YES |
password | Password for authentication | YES |
Code |
Meaning |
Action Required |
---|---|---|
200 | OK (normal result) | Parse the results for the incoming message details as described below. |
204 | No content (no messages) | No incoming messages. Pause processing and retry after 30 seconds. |
401 | Unauthorized | Check userId and password. |
405 | Incorrect Connection Method Used | Use the HTTP GET Method rather than POST. |
500 | Internal Error | Contact Bulletin.net |
List Item |
Description |
Notes |
---|---|---|
messageId | A unique identifier for the message | Bulletin Connect Unique ID. Check this ID to ensure you have not already processed this incoming message (50 character (max) string). |
from | Source MSISDN | he sender of the SMS message in International format. |
to | Destination MSISDN | The number the message was sent to. Applies to MO messages only, not to reply messages. |
rateCode | The rate code for the short code the message was sent to (if applicable) | |
inReplyTold | Correlation ID (if the message is a reply) | Matches the messageId sent by you in an outbound message. If no messageId was set when you submitted the original message then this will contain default. If the message is sent to a dedicated short code then the inReplyToId parameter will not be available even if it is a reply to a message you have sent from that short code as they are still considered MO messages. |
body | Message Content | URL encoded content of the users message |
Handy Hint To take advantage of the patented 2-way SMS message threading ensure that you set a unique messageId in your outbound message and match it with the inReplyToId in the incoming message. |
To Receive a Message Receipt
Name (case sensitive) |
Description |
Required? |
---|---|---|
userId | User name for authentication | YES |
password | Password for authentication | YES |
Code |
Meaning |
Action Required |
---|---|---|
200 | OK (normal result) | Parse the results for the incoming status details as described below then repoll to get another status. |
204 | No content (no messages) | No incoming messages. Pause processing and retry after 30 seconds. |
401 | Unauthorized | Check userId and password. |
405 | Incorrect Connection Method Used | Use the HTTP GET Method rather than POST. |
500 | Internal Error | Contact Bulletin.net |
Name (case sensitive) |
Description |
Notes |
---|---|---|
messageId | A unique identifier for the message | Bulletin SMPP Unique ID. Check this ID to ensure you have not already processed this status update (50 character (max) string). |
from | Source MSISDN | The recipients number of an outbound message sent by you (international format). |
to | Destination MSISDN | |
statusCode | Message status | See #Message Status Codes for simple descriptions of Codes used. |
inReplyTold | Correlation ID (if the message is a reply) | Matches the messageId sent by you in an outbound message. If no messageId was set then this will contain default. |
error | Descriptive Text | More (readable) information about the Message Status. |
Blocked Recipients The format of status receipts for blocked recipients is slightly different than that of other status messages. |
Queue Depth
Name (case sensitive) |
Description |
Required? |
---|---|---|
userId | User name for authentication | YES |
password | Password for authentication | YES |
Bulletin Connect will respond to HTTP requests with one of the following result codes:
Code |
Meaning |
Action Required |
---|---|---|
200 | OK (normal result) | Parse the results for the incoming status details as described below then repoll to get another status. |
401 | Unauthorized | Check userId and password. |
500 | Internal Error | Contact Bulletin.net |
Message Status Codes
Code |
Description |
Notes |
Final Status? |
---|---|---|---|
NUR | Number Unreachable | Check the number is correct and in International Format and then resend. The error string will also provide some more useful information such as whether the recipient is blocked. Be careful about infinite loops, only retry a couple of times. | YES |
SNT | Message Passed to Network | Wait. Give it a few minutes and then poll for more Status Messages. | NO |
ERR | Internal Error | An error occurred. It may be recoverable so try sending the message again in a few minutes. Be careful about infinite loops in your code. |
YES |
NRCV or NRC | Not Received | Check the number is correct and in International Format and then resend. Be careful about infinite loops though. |
YES |
RCV | Message Received | Excellent. This is a final status for this message and the handset has received it. |
YES |
EXP | Message was not delivered within allowed time | This is a final status for this message and the handset has not received it. Retry if you want but for a lot of carriers this status may take days to return so the message may no longer be relevant. |
YES |
INF | Insufficient funds | A billing error has occurred. If you get this error then your Bulletin Online account has reached its credit limit. This is very rare and you need to contact Bulletin immediately. No more messages can be sent until this is rectified. |
YES |
Handy Hint To ensure you know the current status or your SMS message, ensure that you set a unique messageId in your outbound message and correlate it with the receipts (inReplyToId field) as you process them. |
Handy Hint - 2 For messages to multiple recipients (in a single POST) your messageId will be the same for each recipient. Therefore you should use a dual key of the messageId and the from fields to track individual replies and status updates. |
Message Re-transmission
Testing your MO Handling
Name (case sensitive) |
Description |
Required? |
---|---|---|
userId | User name for authentication | YES |
password | Password for authentication | YES |
to | The shortcode that is assigned to you that the handset will send the number to | YES |
from | The sender of the SMS message (eg the fake handset) in International format | YES |
body | URL Encoded content of the fake SMS | YES |
SMPP Overview
Bulletin SMPP Details
Host | smsc01.bulletin.net |
Port | 10000 |
Threading Settings
TON | 4 |
NPI | 0 |
There are two methods for reply and status tracking using mTAG threading with SMPP.
- Set your unique message ID as the sender address in your message
- Source TON must be 4
- Message ID is a numeric up to 19 characters in length
- Record the message id that is returned in the SMPP submit response.
Any replies and delivery receipts will contain the message id for linking to the original MT message. They will also contain the ID provided as your sender address if set in the original MT message.
Setting Source
This is the recommended way to set the source for a message.
TON 5 NPI 0 Source Address The ALPHA string that you want to appear on the handset. Bulletin will need to allow this feature on your account
TON 1 NPI 0 Source Address The phone that you want to appear as the sender on the handset. Bulletin will need to allow this feature on your account
STOP Message Handling Process
Actions and Alternatives
Q: How to remove a number that was added in error?A: If you believe that a SMS response was not a true opt-out request then ask the recipient to contact us by phone quoting your Bulletin Connect Account ID and we will remove them from the blocked list.Q: What if I have my own opt-out process in place?A: If you have a proven opt-out process in place, that we feel is suitable, then we are happy to remove you from this process. If we do that then you will still get an email when we detect a stop request but we will not send any confirmation SMS to the handset or block any future messages to that number.Q: Can I see a list of numbers that have opted out of my messages?A: Sorry, no. The recipient has asked that they no longer receive messages from you therefore we do not want to provide you a list of these numbers that you can then potentially use elsewhere. If you have a specific number that you want clarified then please contact us and we will see what we can do to assist.
To Have Messages POSTed to Your Server
Extended Messaging
- Multipart SMS Messages
- WAP Service Indication
- vCard (electronic business card)
-
vCalendar (events and appointments)
Multipart SMS Messages
SMS Parts |
7-bit Length |
16-bit Length |
---|---|---|
1 | 160 | 70 |
2 | 306 | 134 |
3 | 459 | 201 |
WAP Service Indication
When using WAP Push messages you should be aware of their limitations. |
Your download...
vCard (electronic business card)
BEGIN:VCARD VERSION:2.1 N:Bulletin.net TEL;WORK;VOICE:+6493071146 TEL;WORK;FAX:+6493071148 EMAIL;INTERNET;1:[email protected] ADR;INTL;HOME:;Level 6;369 Queen Street;Auckland;;;New Zealand NOTE;ENCODING=QUOTED-PRINTABLE:Bulletin.net, talk to us today END:VCARD
vCalendar (events and appointments)
BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT UID:380 SUMMARY:Father's Day DTSTART:20060903T083000 DTEND:20060903T223000 CLASS:PUBLIC PRIORITY:1 STATUS:NEEDS ACTION END:VEVENT END:VCALENDAR
Hints and Tips
- Remember to URL encode all parameters, especially the body parameter which will often contain characters that aren't allowed in form encoding
- When serving content with WAP push make sure that your web server presents the correct mime types for your content
- Wrap content in WML pages for a better user experience
- Multipart messages are charged per part
- Read the FAQ
- Extended messaging to CDMA networks is not currently supported (we will add support in the future)