README
You can find original SMS Brana documentation here
This SDK is using hash authorization method (password + time + salt)
Example
Send simple SMS
const smsClient = new Client('<your_login>', '<your_passowrd>')
const smsBody = new SmsBody('<target_phone_number>', '<message_text>');
smsClient.sendSms(smsBody).then(res => console.log(res))
You can find more examples here
API Documentation
Client:
constructor(login, password)
- returnsClient
object, you can get yourlogin
andpassword
from www.smsbrana.czobject functions:
sendSms(smsBody)
- returns response from SMS gate, its parameter is instance ofSmsBody
sendMultipleSms(smsBodyArray)
- returns response from SMS gate, its parameter is array ofSmsBody
instancesgetCreditStatus()
- returns your current creditsgetAcceptedMessages()
- returns answers to your messages
SmsBody:
constructor(number, message)
- returnsSmsBody
objectnumber
- string - target phone numbermessage
- string - content of SMS to send without diacritics
optional object parameters:
when
- string - when to send the message (YYYYMMDDTHHMMSS
GTM+02:00)delivery_report
- 0 or 1 - send email when message has been delivered (default 0)sender_id
- string - ID of authorized phone number from where will be sent messagesender_phone
- string - authorized phone number from where will be sent messageuser_id
- string - your own message identifier for administration purposesdata_code
- 7bit or ucs2 - message encoding (default 7bit)answer_mail
- string - email where will be sent the answer to your messagedelivery_mail
- string - email where to send that the message has been delivered