Send SMS over GET

GET https://api.bsms.viamobile.sk/get/send - Send SMS


HTTP Basic Authorization

HTTP header Value
Authorization Basic base64(username:password)
GET https://api.bsms.viamobile.sk/get/send?id=1&msisdn=421903123456&text=testsms HTTP/1.1 Content-Type: text/xml;charset=UTF-8 Authorization: Basic dGVzdDp0ZXN0 Host: api.bsms.viamobile.sk

JSON Web Token (JWT) Authoriation

Requesst JWT valid for 24 hours.
See jwt.io
GET https://api.bsms.viamobile.sk/token/create?username=test&password=test HTTP/1.1 Content-Type: text/xml;charset=UTF-8 Host: api.bsms.viamobile.sk
Parameter Required Type Description
/response/status Required Int32 Server response (200 in case of success, 4xx in case of error)
/response/jwt Required String JSON Web Token
{ "response": { "status": 200, "jwt" : "xxx.yyy.zzz" } }

Error codes

Code Description
1000 Unauthorized Unknown username or password
1011 Unknown network Carrier not permitted
1012 Unknown sender Sender not permitted
1013 Message too long Message is too long
1014 ID not integer ID of message is not numeric
2001 SMS sending disabled SMS sending is not allowed, please contact Via Mobile to enable this funcionality
2002 Not enough credit Unknown username or password
1.1 Send SMS

Send SMS - request

Parameter Required Type Description
sender
Optional String(11) Sender name, max. 11 characters
Default: InfoSMS
type
Optional Enum gsm/utf8
gsm - standard SMS message (default, GSM7 alphabet).
Text with max. 160 characters will be sent as 1 SMS, text over 160 characters will be sent as ceil(length(text)/153) SMSs

utf8 - unicode message (UTF8 alphabet).
Text with max. 70 characters will be sent as 1 SMS, text over 70 characters will be sent as ceil(length(text)/67) SMSs
time_to_send
Optional ISO timestamp ISO timestamp in format YYYY-MM-DD HH:mm:ss, e.g. 2019-01-01T21:00:00
Default: now
id
Required Int64 Unique message ID from client system
msisdn
Required Int64 Recipient MSISDN in international format without + or 00. E.g. 421903123456
text
Required String(480) Message text
jwt
Optional String JSON Web Token
GET https://api.bsms.viamobile.sk/get/send?id=123&msisdn=421903123456&text=testsms HTTP/1.1 Content-Type: text/xml;charset=UTF-8 Authorization: Basic dGVzdDp0ZXN0 Host: api.bsms.viamobile.sk
GET https://api.bsms.viamobile.sk/get/send?id=123&msisdn=421903123456&text=testsms&jwt=xxx.yyy.zzz HTTP/1.1 Content-Type: text/xml;charset=UTF-8 Host: api.bsms.viamobile.sk

Response

Parameter Required Type Description
/response/status Required Int32 Server response (200 in case of success, 4xx in case of error)
/response/recipients/id Required Int64 Unique message ID from client system
/response/recipients/status Required String send status: ok - sent
blacklist - MSISDN blacklisted
error - could not send/error
notAllowed - MSISDN not permitted for testing
network_disabled - destination network forbidded
/response/recipients/price Optional Decimal Message price (message can be divided into several multipart SMSs).
Null, if price not configured.
/response/recipients/parts Required Int32 Count of multipart SMSs.
/response/recipients/duplicate Optional Boolean Duplicate flag.
{ "response": { "status": 200, "recipients": [ {"id":"123","status":"ok", "parts":1, "price": 0.03} ] } }
1.2 Send Unicode SMS

Send Unicode SMS - request

Parameter Required Type Description
sender
Optional String(11) Sender name, max. 11 characters
Default: InfoSMS
encoding
Optional Enum gsm/utf8
gsm - standard SMS message (default, GSM7 alphabet).
Text with max. 160 characters will be sent as 1 SMS, text over 160 characters will be sent as ceil(length(text)/153) SMSs

utf8 - unicode message (UTF8 alphabet).
Text with max. 70 characters will be sent as 1 SMS, text over 70 characters will be sent as ceil(length(text)/67) SMSs
time_to_send
Optional ISO timestamp ISO timestamp in format YYYY-MM-DD HH:mm:ss, e.g. 2019-01-01T21:00:00
Default: now
id
Required Int64 Unique message ID from client system
msisdn
Required Int64 Recipient MSISDN in international format without + or 00. E.g. 421903123456
text
Required String(480) Message text
jwt
Optional String JSON Web Token
GET https://api.bsms.viamobile.sk/get/send?id=123&msisdn=421903123456&text=testsms%20%C4%BE%C5%A1%C4%8D%C5%A5%C5%BE%C3%BD%C3%A1%C3%AD%C3%A9 HTTP/1.1 Content-Type: text/xml;charset=UTF-8 Authorization: Basic dGVzdDp0ZXN0 Host: api.bsms.viamobile.sk
GET https://api.bsms.viamobile.sk/get/send?id=123&msisdn=421903123456&text=testsms%20%C4%BE%C5%A1%C4%8D%C5%A5%C5%BE%C3%BD%C3%A1%C3%AD%C3%A9&jwt=xxx.yyy.zzz HTTP/1.1 Content-Type: text/xml;charset=UTF-8 Host: api.bsms.viamobile.sk

Send Unicode SMS - response

Parameter Required Type Description
/response/status Required Int32 Server response (200 in case of success, 4xx in case of error)
/response/recipients/id Required Int64 Unique message ID from client system
/response/recipients/status Required String send status: ok - sent
blacklist - MSISDN blacklisted
error - could not send/error
notAllowed - MSISDN not permitted for testing
network_disabled - destination network forbidded
/response/recipients/price Optional Decimal Message price (message can be divided into several multipart SMSs).
Null, if price not configured.
/response/recipients/parts Optional Int32 Count of multipart SMSs.
/response/recipients/duplicate Optional Boolean Duplicate flag.
{ "response": { "status": 200, "recipients": [ {"id":"123","status":"ok", "parts":1, "price": 0.03}, ] } }