Files
m3o-go/examples/otp/validate/validateOtp/main.go
2021-11-03 15:36:34 +00:00

20 lines
289 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/otp"
)
// Validate the OTP code
func main() {
otpService := otp.NewOtpService(os.Getenv("M3O_API_TOKEN"))
rsp, err := otpService.Validate(&otp.ValidateRequest{
Code: "656211",
Id: "asim@example.com",
})
fmt.Println(rsp, err)
}