func (authy *Authy) RequestSMS(userID string, params url.Values) (*SMSRequest, error) {
	path := "/protected/json/sms/" + url.QueryEscape(userID)
	response, err := authy.DoRequest("GET", path, params)
	if err != nil {
		return nil, err
	}
	defer closeResponseBody(response)
	smsVerification, err := NewSMSRequest(response)
	return smsVerification, err
}
RequestSMS requests a SMS for the given userID
package authy
import (
	"fmt"
	"io"
	"log"
	"net"
	"net/http"
	"net/url"
	"os"
	"strconv"
	"strings"
	"time"
)
var (
	Logger = log.New(os.Stderr, "[authy] ", log.LstdFlags)
	_Dialer = &net.Dialer{
		Timeout:   5 * time.Second,
		KeepAlive: 30 * time.Second,
	}
	DefaultTransport = &http.Transport{
		Proxy:                 http.ProxyFromEnvironment,
		DialContext:           _Dialer.DialContext,
		MaxIdleConns:          128,
		IdleConnTimeout:       30 * time.Second,
		TLSHandshakeTimeout:   5 * time.Second,
		ExpectContinueTimeout: 3 * time.Second,
	}
)
const (
	longPollingDelay = 2000 * time.Millisecond
)
const (
	SMS = "sms"
	Voice = "call"
)
type Details map[string]string
type Authy struct {
	APIKey  string
	BaseURL string
	Client  *http.Client
}
func NewAuthyAPI(apiKey string) *Authy {
	apiURL := "https://api.authy.com"
	return &Authy{
		APIKey:  apiKey,
		BaseURL: apiURL,
		Client: &http.Client{
			Transport: DefaultTransport,
		},
	}
}
func (authy *Authy) RegisterUser(email string, countryCode int, phoneNumber string, params url.Values) (*User, error) {
	Logger.Println("Creating Authy user with", email, ",", phoneNumber, "and", countryCode)
	path := "/protected/json/users/new"
	params.Set("user[cellphone]", phoneNumber)
	params.Set("user[country_code]", strconv.Itoa(countryCode))
	params.Set("user[email]", email)
	response, err := authy.DoRequest("POST", path, params)
	if err != nil {
		return nil, err
	}
	userResponse, err := NewUser(response)
	return userResponse, err
}
func (authy *Authy) UserStatus(id string, params url.Values) (*UserStatus, error) {
	Logger.Println("Finding Authy user with id", id)
	path := fmt.Sprintf("/protected/json/users/%s/status", id)
	response, err := authy.DoRequest("GET", path, params)
	if err != nil {
		return nil, err
	}
	statusResponse, err := NewUserStatus(response)
	return statusResponse, err
}
func (authy *Authy) VerifyToken(userID string, token string, params url.Values) (*TokenVerification, error) {
	path := "/protected/json/verify/" + url.QueryEscape(token) + "/" + url.QueryEscape(userID)
	response, err := authy.DoRequest("GET", path, params)
	if err != nil {
		Logger.Println("Error while contacting the API:", err)
		return nil, err
	}
	defer closeResponseBody(response)
	tokenVerification, err := NewTokenVerification(response)
	return tokenVerification, err
}