Valuefirst HTTP Api Version 1.3.2 User Guide Version
Valuefirst HTTP Api Version 1.3.2 User Guide Version
1
Table of Contents
Introduction 3
Overview Of Service 3
Sender ID Consideration 3
Character set support 3
Message Length 3
Using Service 4
End Point 4
Service Response 4
Extended Parameters 5-6
Using UDH for Wake-up Messaging 7
Sending Binary Messages 9
Sending Ringtones 10
Sending Bulk Messages 10
DLR URL 11
Message Status Error Code 12
Application Constraints (For bulk messages only) 12
HTTP Status Pull API 13
Regulatory Implementation and Impact 14
Sender ID Regulation 14
National Customer Call Preference Registry (NCCPR) 15
2
Introduction
Overview of Service
ValueFirst HTTP SMS service is designed to let end user send across SMS messages using HTTP interface.
The API supports custom UDH, flash messages, message scheduling (if supported by operator) and various
other advance features.
The API is specially designed to let user send custom UDH while sending messages.
Message Length
If a message is sent whose length is longer than permitted characters limit, it shall be counted as multiple
messages, however will be delivered on handset as a single message.
For standard Latin character set 160 characters per SMS is supported. If SMS text is longer than 160
characters, messages shall be calculated in multiples of 153 characters.
For Unicode messaging (non-English) only 70 characters per SMS is supported. If Unicode SMS text is
longer than 70 characters, messages shall be calculated in multiples of 67 characters.
For Binary messaging 140 characters including UDH is supported. If Binary SMS is longer than 140
characters, messages shall be calculated in multiples of 134 characters.
3
Using Service
End Point
The end point of the service is https://http.myvfirst.com/smpp/sendsms. The complete URL is as follows:
https://http.myvfirst.com/smpp/sendsms?username=[xxxxxxxx]&password=[
xxxxxxxx]&to=[xxxxxxxxxx]&udh=[xxxxxxxxx]&from=[xxxxxxxx]&text=[xxxxxxx
xxxxxxxx]&dlr-url=[xxxxxxxxxxxxx]....
The following are the required parameters:
Parameter Description
Username Specify the account name. Kindly contact ValueFirst to get one
Password Password attached to username
To Recipient number. Only single recipient is supported
From Sender Number or ID. Sender ID can be a 9-13 digits number
or 11 digit alpa-numeric sender ID.
Text Text that needs to be sent on mobile handset. In case of
binary content or Unicode messages the Text should be hex-
encoded value.
dlr-url Specify the path on which Delivery report need to be returned.
This is a path on your server, which shall be called in when a
delivery report is received by ValueFirst against an outgoing
message.
Udh User-defined data header. The data header is used for long
messages as well as sending binary content. If you need to
send message to specific port (for j2me application to
receive), you may specify the information in udh parameters.
Service Response
When data is posted on HTTP API, the following responses are generated.
Response Description
Sent. Message sent Successfully
Sent. Split into N Message was sent, however it was found to be longer
than permitted limit and hence was spitted into multiple
messages
Number(s) has/have been denied by white- and/or black- Invalid Recipient numbers.
lists.
Empty receiver number not allowed, rejected Recipient number is empty.
4
Extended Parameters
The followings are the extended parameter supported by ValueFirst HTTP API. Please note that all variables
are in small case.
charset String Charset of text message. Used to convert to a format suitable for
7 bits or to UCS-2. Defaults to WINDOWS-
1252 if coding is 7bits and UTF-16BE if coding is UCS-2.
Udh String Optional User Data Header (UDH) part of the message. Must be
URL encoded. For detail on how to use UDH
for wake-up messaging, kindly see the next section
Mclass Number Optional. Sets the Message Class in DCS field. Accepts
Values between 0 and 3, for Message Class 0 to 3, A value of 0
sends the message directly to display, 1 sends to mobile, 2 to SIM
and 3 to SIM toolkit.
mwi number Number Optional. Sets Message Waiting Indicator bits in DCS field. If
given, the message will be encoded as a Message Waiting
Indicator. The accepted values are 0, 1, 2 and 3 for activating the
voice, fax, email and other indicator or 4, 5, 6, 7 for deactivating,
respectively. This option excludes the flash Option.
compress Number Optional. Sets the Compression bit in DCS Field.
Coding Number Optional. Sets the coding scheme bits in DCS field. Accepts values
0 to 2, for 7bit, 8bit or UCS-2. If unset, defaults to 7 bits unless a
UDH is defined, which sets
coding to 8bits.
5
dlr-mask Number (bit- Optional. Request for delivery reports with the state of
mask) the sent message. The value is a bit mask composed
of:
1: Delivered to phone,
2: Non-Delivered to Phone,
4: Queued on SMSC,
8: Delivered to SMSC,
16: Non-Delivered to SMSC.
Must set dlr-url on sendsms-user group or use the dlr-
url CGI variable.
dlr-url String URL Optional. If dlr-mask is given, this is the url to be
fetched.
(Must be url-encoded)
alt-dcs Number Optional. If unset, Kannel uses the alt-dcs defined on
SMSC configuration or 0X per default. If equals to 1,
uses FX.
If equals to 0, force 0X.
Rpi Number Optional. Sets the Return Path Indicator (RPI) value.
(See ETSI Documentation).
priority number Number Optional. Sets the Priority value (Range 0-3 is allowed).
category String Optional parameter to send bulk messages. It can
consists of value: bulk
6
Using UDH for Wake-up Messaging
UDH is used for sending long messages that are assembled at Mobile device level into one SMS. UDH is also
used for sending specialized messages like Ringtone, logo, picture messages, vCard, vCAL and messages to
custom mobile applications.
The most common use of UDH is to send message to a specific port (called destination port). Since each port
has a different meaning on mobile phone, mobile phone understands message content according to port of
the message.
The following are the standard ports:
7
The UDH parameter which is usually 12 bytes hex content need to be setup in following manner:
However if the message can be accommodated in 1 SMS only then you may change the UDH length as well
as remove elements related to message concatenation information. The new UDH may look like following:
For single message case your UDH has now become &udh=%06%05%04%15%82%00%00
8
Sending Binary Messages
ValueFirst HTTP SMS service can be used to send binary messages. To send binary messages to CDMA
numbers, client need to send well formed user data header failing on which service will return an error.
Binary message text must be prefixed with well formed user data header.
Delimiter: <space>
However, if message text can be sent in one SMS only then, we may change the user data header as i.e.
9
Ringtone on CDMA Numbers
Following is an example of ringtone message, which can be sent by single SMS. Ringtone reader listens on
port 1581 of the mobile terminal.
Ex: 024A3A650995D1D195C93D999804144288F511610611624D30831445
Udh part for given ring tone would be //SCKL1581+ so the URL encoded text
parameter would be as:
%2F%2FSCKL158A000000+024A3A594D8549951D84040018D9049161361561661861A61C
6288B000
Customer can use following sample URL in the http request to send bulk message:
Sample URL:
https://xxx.xxx.x.xxx/sendsms?username=vf&password=vf123&to=9198xxxxxxxx,9199xxxxxxxx&f
rom=Senderid&text=this%20is%20a%20test%20message&category=bulk
1
DLR URL
Customer can use following sample URL for receiving the DLR:
https://ip/app/status?unique_id=%7&reason=%2&to=%p&from=%P&time=%t&status=%d
Below table depicts the parameter values to be passed to get corresponding values
1
Message Status Error Code
HTTP API processed messages‟ status can be tracked via the following list of error code.
Error Code Error Type Description
„1‟ Invalid Receiver This error code generates if message(s) receiver’s mobile
number:
Is invalid
Greater than 16 digits
„2‟ Invalid Sender This error code generates if message sender:
Uses wrong alphanumeric/numeric sender ID
Uses sender ID of greater than 16 digits
„3‟ Invalid Message This error code generates if:
Blank message is sent
UDH header section does not encapsulate binary content
Message template does not match (In case of
transactional messages)
„4‟ Service not available This error code generates if:
Operator’s service is down
Server side services are down
„5‟ Authorization failed This error code generates if server side authentication fails owing to:
Wrong user name
Wrong password
Wrong user name and password
„6‟ Contract Expired This error code generates if service usage contract expires.
„7‟ Credit Expired This error code generates if message(s) sender’s credit account
balance is zero.
„8‟ Empty Receiver This error code generates if message recipient’s number is not
mentioned in the HTTP API‟s parameters.
„14‟ Non-compliant This error code generates if the message is sent violating
message TRAI guidelines and set of rules.
28702 Invalid DLT This error codes comes in case of any invalid or blank values
Parameters received in DLT parameters.
28703 Invalid DLT Content This error codes comes in case of any invalid or blank DLT content
Type type value.
1
HTTP Status Pull API
An API has been developed to check the status of GUID submitted on HTTP API where
category=Bulk.
Category Bulk- Stores the value as “bulk” that specifies bulk messages are to be sent to
multiple recipients in a single HTTP hit.
https://http.myvfirst.com/smpp/sendsms?username=XXXXX&password=XXXXXX&to=91
XXXXXXXXXX&udh=&from=VFIRST&text=This%20is%20a%20test%20SMS%20flash%
20SMS&category=bulk
A GUID is returned to the user acknowledging successful submission (with errorcode=0)
guid=XXXXXXXXXXXXXXXXXXXXXHTTP&errorcode=0&seqno=91XXXXXXXXXX
• Using the GUID user can check the delivery status using following URL by providing their
username, password along with the GUID..
https://http.myvfirst.com/smpp/status?username=XXXXXXX&password=XXXXXXXX&guid=k
h4rc500404XXXXXXXXXXXXXXX
• If multiple mobile numbers is submitted it will return comma separated mobile number wise
response.
OR
1
Error Codes
All the DLT and operator related DLR errors codes that may come across in ValueFirst are listed below:
Sender ID Regulation
Telecom Regulatory Authority of India (TRAI) has given a direction to all telecom service provider of India to prefix
an Identification Code before SenderID for every message sent using alpha and numeric sender id. The Direction can
be downloaded directly from TRAI website or simply by clicking following link:
https://www.trai.gov.in/WriteReadData/trai/upload/Directives/131/direction10dec08.pdf
1
The Identification Code will be of three characters, consisting, Service Provider Code and Service Area Code,
followed by a Hyphen character. Hence, the maximum length of a sender ID has been fixed to 6 characters for
alpha and numeric both.
1
The details of operator codes are as below:
1
National Customer Call Preference Registry (NCCPR)
NCCPR (previously known as NDNC) is a database of all users who do not wish to receive unsolicited
commercial communication. The list is managed by TRAI. ValueFirst has a strict No-SPAM policy and hence a
person whose mobile number exists in this list must not be sent any commercial communication using voice
or SMS, unless s/he has not given explicit permission to receive so.