Skip to content

vishalknishad/mobtexting-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

golang plugin for mobtexting

This package makes it easy to send Mobtexting notifications.

Installation

You can install the package using go get :

go get github.com/mobtexting/mobtexting-go

Send SMS Usage

package main
import "fmt"
import client "github.com/mobtexting/mobtexting-go"

func main() {
        var to = "1234567890"
        var from = "MobTxt"
        var body = "hello from go"
        var service = "P"
        var access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"

        var response = client.Send(to, from, body, service, access_token)

	fmt.Println(response)
}

Verify Usage

Send

var to = "1234567890"
var access_token = "xxxxxxxxxxxxxxxxx"
var response = client.VerifySend(to, access_token)
fmt.Println(response)

Check

var id = "b51be650-fdb2-4633-b101-d450e8d9ec64", // id received while sending
var token = "123456" // token entered by user
var access_token = "xxxxxxxxxxxxxxxxx"
var response = client.VerifyCheck(id, token, access_token)
fmt.Println(response)

Cancel

var id = "b51be650-fdb2-4633-b101-d450e8d9ec64", // id received while sending
var access_token = "xxxxxxxxxxxxxxxxx"
var response = client.VerifyCancel(id, access_token)
fmt.Println(response)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%