Newfangled Package Modernizer

    @textgun/sms-api

    1.0.4 • Public • Published

    textgun sms-api

    This is the API to send and receive SMS text messages with textgun

    This API currently works for USA and Canada phone numbers only.

    You can get the username and password credentials from the textgun website.

    const textgun = require('@textgun/sms-api')
    
    const username = ''
    const password = ''
    
    SendSMS(username,password, "19179362841","Hello World!",(error,response,body) => {
    
     // if we have a problem login credentials 
     if ( response.statusCode == 401) {
        console.log(body)
    }
        if (!error && response.statusCode == 200) {
            console.log(body);
        }
    })
    
    getNewSMS(username,password,(error,response,body) => {
    
     // if we have a problem login credentials 
     if ( response.statusCode == 401) {
        console.log(body)
    }
        if (!error && response.statusCode == 200) {
            console.log(body);
        }
    })
    

    Install

    npm i @textgun/sms-api

    DownloadsWeekly Downloads

    19

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    2.16 kB

    Total Files

    3

    Last publish

    Collaborators

    • textgun