Movider API client for Go. API support for SMS, Verify, Acknowledge Verify and Cancel Verify.
The first need Go installed (1.10.4 or higher).
$ go version
go version go1.10.4
You can use Movider Client Library in your Go project by go get
:
$ go get github.com/movider/movider-go
Assuming the go get
installation worked. You can import the Movider's package like this:
import "github.com/movider/movider-go/client"
Then, create a client an instance of Client.
c := client.New("your-api-key", "your-api-secret")
If you not have api_key and api_secret, Sign up Movider's account to use.
Send an outbound SMS from your Movider's account. So import the Movider's SMS package like this:
import "github.com/movider/movider-go/sms"
Then, send an SMS.
d, err := sms.Send(c, []string{
"your-recipient-number",
}, "First an SMS from Movider.", &sms.Params{})
your-recipient-number
are specified numbers in E.164 format such as 66812345678, 14155552671.
Use Verify request to generate and send a PIN to your user. So import the Movider's Verify package like this:
import "github.com/movider/movider-go/verify"
Then, send a verification code.
d, err := verify.Send(c, "your-recipient-number", &verify.Params{})
your-recipient-number
are specified numbers in E.164 format such as 66812345678, 14155552671.
Use Verify Acknowledge to confirm that the PIN you received from your user matches the one sent by Movider in your verify request. (Do not forget import Verify package).
import "github.com/movider/movider-go/verify"
d, err := verify.SendAcknowledge(c, "your-request-id", "your-code")
your-request-id
is returned when you sent verification code complete.
your-code
is verification code by your user.
Control the progress of your verify requests. To cancel an existing verify request. (Do not forget import Verify package).
import "github.com/movider/movider-go/verify"
d, err := verify.SendCancel(c, "your-request-id")
your-request-id
is returned when you sent verification code complete.
Complete documentation, instructions, and examples are available at https://movider.co
Movider client library for Go is licensed under The MIT License. Copyright (c) 2019 1Moby Co.,Ltd