3.3.8 • Published 5 months ago

@gosmsge/gosmsge-node v3.3.8

Weekly downloads
26
License
ISC
Repository
github
Last release
5 months ago

Node.js Package CircleCI

GOSMS.GE Node JS SMS Send

Node JS client module to send SMS messages using GOSMS.GE SMS Gateway.

To use this library, you must have a valid account on https://gosms.ge.

Please note SMS messages sent with this library will be deducted by your GOSMS.GE account credits.

For any questions, please contact us at info@gosms.ge

Installation

$ npm install @gosmsge/gosmsge-node --save

Send a message with Classic type

const SMS = require('@gosmsge/gosmsge-node')

const sms = new SMS('api_key')

sms.send('995555555555', 'Hello!',  'GOSMS.GE')
  .then(body => console.log(body)) // returns {"code": string,"message": string,"message_id": number,"balance": number,"user": string}
  .catch(err => console.log(err.message))

Check status of message

const SMS = require('@gosmsge/gosmsge-node')

const sms = new SMS('api_key')

sms.status('message_id')
  .then(body => console.log(body)) // returns { id: number,sender: string,receiver: string,message: string',message_id: string,amount: number,status: string }
  .catch(err => console.log(err.message))

Check balance

const SMS = require('@gosmsge/gosmsge-node')

const sms = new SMS('api_key')

sms.balance()
  .then(body => console.log(body)) // returns { balance: number, user: string }
  .catch(err => console.log(err.message))

OTP SMS send

const SMS = require('@gosmsge/gosmsge-node')

const sms = new SMS('api_key')

sms.sendOtp('995555555555')
  .then(body => console.log(body)) 
  .catch(err => console.log(err.message))

Response

{
  "success": true,
  "hash": "hashkey",
  "to": "995123456789",
  "sendAt": "2020-05-24T09:56:02.449Z",
  "encode": "default",
  "segment": 1,
  "smsCharacters": 57
}

OTP SMS verification

const SMS = require('@gosmsge/gosmsge-node')

const sms = new SMS('api_key')

sms.verifyOtp('995555555555', '23423uhe784375yf234n59', 1234) // phone number, hash, code
  .then(body => console.log(body)) 
  .catch(err => console.log(err.message))

Response

{
  "success": true,
  "verify": true
}

More info

You can check out our website https://www.gosms.ge

3.3.8

5 months ago

3.3.7

7 months ago

3.3.6

7 months ago

3.3.5

7 months ago

3.3.4

7 months ago

3.3.1

1 year ago

3.3.3

1 year ago

3.3.2

1 year ago

3.2.2

1 year ago

3.2.0

1 year ago

3.1.0

1 year ago

3.0.1

1 year ago

3.0.0

3 years ago

2.2.0

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.2

3 years ago

2.1.4

3 years ago

2.1.0

3 years ago

2.0.3

4 years ago

2.0.4

4 years ago

2.0.1

4 years ago

1.0.7

4 years ago

2.0.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago