Skip to content

ikanade/nexmo-verify-go-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexmo Go Verify SDK

You use Nexmo Verify to verify that a user has access to a specific phone number. Nexmo sends a PIN code in an SMS or Text-To-Speech, your user enters this PIN into your App, you validate the PIN with Nexmo. With Verify SDK for Go you easily integrate Verify functionality into your App.

This implementation mimics the Nexmo Android SDK, since Golang is not a supported language.

Usage

For VerifySearch request

import nexmo "github.com/hashlabs/nexmo-verify-go-sdk"

client := nexmo.NewClient(<appId>, <sharedSecret>)

response, err := client.VerifySearch(map[string]string {
  "device_id":         deviceId,
  "source_ip_address": "127.0.0.1",
  "number": "+521111111111",
})
if err != nil {
  panic(err)
}

// Use the response struct to check for the user_status

For VerifyRequest

import nexmo "github.com/hashlabs/nexmo-verify-go-sdk"

client := nexmo.NewClientV2(<apiKey>, <apiSecret>)

response, err := client.VerifyRequest(map[string]string {
  "number":         "+911111111111",
  "brand": "FooBarCompany",
})
if err != nil {
  panic(err)
}

// Use the response struct to check for the user_status

For VerifyCheck

import nexmo "github.com/hashlabs/nexmo-verify-go-sdk"

client := nexmo.NewClientV2(<apiKey>, <apiSecret>)

response, err := client.VerifyRequest(map[string]string {
  "request_id":         "fromTheVerifyRequestResponseValues",
  "code": "sms_code",
})
if err != nil {
  panic(err)
}

// Use the response struct to check for the user_status

Endpoints

  • GetToken
  • Verify
  • VerifyCheck
  • VerifyControl
  • VerifySearch
  • VerifyLogout

License

MIT

About

Nexmo's Verify Go SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%