Sending TEXT or BINARY messages via HTTP(S)9-Oct-18

PUSH is used to send a Text (SMS) or Binary message to a mobile phone via Internet/HTTP(s).
To send, you need to have an account on Eurobate’s SMS-gateway. The username and password is provided by Eurobate.

The message can either be sendt via an internet browser – or more typically – let a program automatically fill inn the values for phone number and message text and then do a HTTP-GET request to Eurobate’s Server.

URL to push API

Remember to URLencode the HTTP request.

- The response is a unique message id that you can use to track messages if necessary.

These messages will be sendt through the “Bulk” gateway. The mobile subscription will not be billed for receiving the SMS. Each message will cost you the price agreed with Eurobate.

If you want to charge the subscriber, see page 2.

Parameter / Required / Value
bruker / Yes / Your username.
passord / Yes / Your password
avsender / Yes / This can either be a GSM number identifying the sender of the message, or an alphanumeric string. Do not use space or special characters. Field length is 15 if numeric, or 11 if alphanumeric. The limitations are due to operator and phone differences.
til / Yes / The mobile number of receiver. Must be 8 byte long, no space. Must start with number 9 or 4.
melding / Yes / The message text. 160 characters pr. message.
batch / No / If you are going to sende messages to many recipients at the same time, please set batch=1 so that the sending does not interfere with ordinary SMS traffic.
land / No / Countrycode. Default 47 for Norway.
See
If you need to send messages outside Norway, then each specific country must be activated by Eurobate for your account. Please note that termination fees may apply in some countries outside Norway.
dato / No / The date and time the message should be sendt. Format: yyyy-mm-dd hh:mm:ss, for example 2002-02-22%2009:50:00, which is february 22, 2002 at 09:50 am. Server time is synchronized with atomclock at UiO. The message is sendt out immediately if the date/time specified is in the past.
udh / No / UDH header. Can be used to sendt binary messages. You are responsible for setting the correct UDH for the receivers phone. NB! Only works with non-billed messages.
format / No / Used for binary messages – see below.
pushlink / No / Used for sending Wap push messages and specifies the wap-link URL. “format” must be set to 95, and “melding” must contain the link description. Descripton should not exceed 20-30 characters.
dlrurl / No / Specifies the url for receiving status messages. (See below for more information)
simulate / No / If value is 1, your request will simulate the sending of a message. Nothing will actually be sendt to the phone. You can use this for testing the API.

BILLING – (messages sendt through the CPA gateway, not bulk.)

The following 4 parameters must be supplied if you want to bill the receiver for the message and partake in the profit-splitt scheme. Standard profit split is 50/50 after operating cost for all messages that are billed more than NOK 1,- These messages will be sendt through the “CPA” gateway, meaning that they go directly through the operator’s SMSC. This is more expensive than the “Bulk” gateway and will therefore cost you more per message if you set the price to 0.

Parameter / Required / Value
avsender / Yes / The sender must be 1938, 2030 or one of Eurobate’s other shortnumbers that has CPA agreement with the operators.
Contact Eurobate for information on how to send messages to a 14-digit sub-number.
ore / Yes / Billed price – in norwegian øre. 300 = NOK 3,- The price must be valid in accordance with the operators pricecategories that are from 1 to 60 kroner. There is no profit splitt on messages under NOK 1,- If ore is not specified, or you set it to 0,- then you will be charged NOK 0,50 per outgoing message.
(See for a list of valid prices.)
operator / Yes / Available carrier networks:
Norway:
47-netcom, 47-telenor, 47-tele2 or 47-ventelo, 47-networknorway, 47-tdc.
Sweden:
46-europolitan, 46-telia, 46-tele2, 46-tre, 46-tdc
If you don’t know the operator, you can specify operator=ukjent (only for Norway and Sweden). This will cause a lookup in the national number portability database.
NOTE! Using “ukjent” will cost you NOK 0,10 extra pr. Message, and must be used in conjunction with the kodeord parameter (see below).
kodeord / Yes / The name of a codeword you own. Must be set up on the same shortnumber as avsender. This is used for statistical purposes. The codeword must be set up on the same shortnumber that you specify in avsender parameter.

Examples:

Free for receiver (sendt through bulk-gateway)

Receiver is billed NOK. 3,- (sendt through CPA-gateway)

Free for receiver, but you will be charged NOK 0,50 (sendt through CPA-gateway)

Return values (http response)

The following texts may be returned from push.php:

"Meldingen er sendt" or "Meldingen er sendt 1913344" (fra push2.php)
The message is sendt to the SMS-gateway for submission to the GSM Network. 1913344 is a message id that is unique to this message.

"Bruker har ikke tilgang til å sende SMS"
This user does not have a PUSH-account with Eurobate. Contact your sales representative at Eurobate to open an account.

"Alle paramatere er ikke fyllt ut !!"
All required parameters must be filled in (see above)

"Feil format på til nr. Må starte på 4 el. 9 med totalt 8 siffer"
The phone number is badly formatted. Must be 8 numbers and start with the number 4 or 9.

"Feil brukernavn og/eller passord"
Contact Eurobate if you lost your username or password.

"Feil kodeord"
The keyword specified in the kodeord parameter does not correspond with avsender. For example if you specify avsender=1938&kodeord=ABC, then the codeword ABC must be set up on shortnumber 1938.

SENDING BINARY MESSAGES

The above information is for standard Text messages. If you want to send binary messages – for example pictures, ringtones, logos etc, then set the parameter “format” to a value from:

00=text
01=ringtone
02=Nokia operator logo
03=Nokia group logo
04=picture message
05=flash SMS

12=Ericsson operator logo (EMS)

95=WAP Push

90=vCard (see Appendix A for format)
99=OTA bookmark
NB! The “melding” parameter must contain the hexcode for the message for the above

DELIVERY REPORTS

It is possible to receive status messages (DLR) from the operator network. This will only be useful when you use push2.php because you need the message ID as a unique identifier for each message. To set it up you will need a script on your server that can receive the DLR. You specify the URL to this script on parameter “dlrurl”.

For example: (from a program)

1) URLencode the message and the dlrurl string:

$message = urlencode(“This is a message”);

$dlrurl = urlencode(“ myhost.com/dlr.php?msgid=MSGID&status=STATUS&operator=OPERATOR&smscode=OPCODE&cbgcode=CBGCODE&stop=STOP”);

(Change the urlencode() function to suit your programming environment.)

2) Run the request:

$dlrurl

NB! Remember to URLencode the message and dlrurl when testing from the browser.

MSGID will be the unique message id number returned from push2.php.

OPCODE returns the operator’s status code. See for a list of codes.

CBGCODE returns the status code from the billing platform (if any). In Norway, this is only valid for 47-tele2. If status is “failed”, then CBGCODE will give the reason. To see the reasoncodes see

OPERATOR returns the operator you specified with the operator parameter, or the found
operator when using operator=ukjent. If the message is sendt via the Bulk-gateway, the operator parameter will contain the string ‘bulk’.

STATUS is the actual delivery status to the handset, and will be one of:

STOP (only valid for payment services) indicates if a user should be temporarily (0) or permanently (1) removed from your service. Permanent removal could be triggered if they have been permanently barred by their operator, or that the user has explicitly required no premium messages.

sendt
Message sendt to the SMS gateway and is waiting to be picked up.

billed
Successful billing has been performed by the Tele2/Telia billing gateway. Message not yet delivered to handset. (This status is only relevant for Tele2 subscribers in all countries, and Telia subscribers in Sweden.)

acked
Message picked up and accepted by operator’s SMSC. Awaiting final delivered/failed status.

rejected
Message sendt from Eurobate and was but was rejected by operator’s SMSC. Usually due to wrong phonenumber format or missing information.

buffered
Message was tried sendt to the phone but could not be delivered, usually because the phone was turned off. Operator will retry until timeout, whereas the final status will be set to delivered or failed.

billed
(Only valid for Tele-2 subscribers, or Telia in Sweden)
Successful billing has been performed by the billing gateway. Awaiting final delivery report for the SMS to the phone.

delivered
Message delivered to the phone.

failed
Message not delivered to phone. Usually because the phone has been turned off and the retry period has expired, or the message is sendt to a invalid phone-number, or billing could not be completed.

It is also possible to see the status for a non-billed message by logging in to (same username/password). Choose the function:
“Push status” from the list of ‘Velg funksjon’.

Stopping SUBSCRIPTION services:

According to Norwegian law, you must remove a user from your subscription service if the user or operator requests it.

To accommodate this, Eurobate has set up the codeword STOP on our shortnumbers 1938 and 2030. When we receive the STOP-message, we will forward the mobile number to you if we know that you have a subscription service.

For example, if you have an SMS codeword for receiving registrations for your subscription services, that service must be flagged as a subscription service. If you receive the messages on the base-URL of , then Eurobate will forward the removal instruction as such: stop=0|1

remove contains the mobile number to remove.

kortnr indicates the shortnumber that the STOP message was sendt to. You are required to remove this user from all your premium services on this shortnumber.

Operator displays the users carrier, prefixed by the country code.

stop indicates if the user should be permanently (1) or temporarily (0) removed from the service. An example of temporary removal would be if the user has no balance left on his prepaid card. Permanent removal could be triggered if they have been permanently barred by their operator, or that the user has explicitly requestet no more premium messages to their subscription.

In order to deliver the STOP-information to you, we need to know if any of your services are subscription-type services. Please inform us of this when you order the codeword. Thank you!

APPENDIX A

Sending vCard will work for Nokia, SonyEricsson and other phones that support vCard version 2.1 or newer.

In addition to the required parameters msisdn, countrycode and originator, you must specify format=90 and include a vCard format in the message parameter.

Example vCard in message parameter:

message='BEGIN:VCARD

VERSION:2.1

N:Firstname;Lastname;Middlename;Title;Suffix

TEL:99999999

TEL;WORK:99999999

TEL;HOME:99999999

TEL;CELL:99999999

TEL;FAX:99999999

EMAIL;INTERNET;ENCODING=QUOTED-PRINTABLE:

URL:

X-CLASS:private

END:VCARD'

– Important! remember newline character at the end of each line.

Page 1 of 7