vonage-go-sdk: github.com/Vonage/vonage-go-sdk Index | Files | Directories

package vonage

import "github.com/Vonage/vonage-go-sdk"

Package vonage provides lightweight wrappers and helper functionality to support integrations using the Vonage APIs.

Each API is a product in its own right and they may not be consistent between APIs - each has its own client, e.g. smsClient, and associated methods.

This library is at an alpha stage, comments, questions and feedback are always welcome! Just open an issue on the GitHub project.

Index

Package Files

api_transport.go application.go auth.go doc.go number.go numberinsight.go sms.go utils.go verify.go voice.go

func GetUserAgent Uses

func GetUserAgent() string

func GetVersion Uses

func GetVersion() string

type APITransport Uses

type APITransport struct {
    APISecret string

    // Transport is the underlying HTTP transport to use when making requests.
    // It will default to http.DefaultTransport if nil.
    Transport http.RoundTripper
}

APITransport lets us add extra HTTP features and pass them around elegantly

func (*APITransport) Client Uses

func (t *APITransport) Client() *http.Client

Client is our HTTP Client with custom rountripper set

func (*APITransport) RoundTrip Uses

func (t *APITransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

type ApplicationCapabilities Uses

type ApplicationCapabilities struct {
    Voice    *ApplicationVoice    `json:"voice,omitempty"`
    Rtc      *ApplicationRtc      `json:"rtc,omitempty"`
    Messages *ApplicationMessages `json:"messages,omitempty"`
    Vbc      *ApplicationVbc      `json:"vbc,omitempty"`
}

Use pointers so we can tell which things were intentionally sent, or not

type ApplicationClient Uses

type ApplicationClient struct {
    Config *application.Configuration
    // contains filtered or unexported fields
}

ApplicationClient for working with the Application API

func NewApplicationClient Uses

func NewApplicationClient(Auth Auth) *ApplicationClient

NewApplicationClient Creates a new Application Client, supplying an Auth to work with

func (*ApplicationClient) CreateApplication Uses

func (client *ApplicationClient) CreateApplication(name string, opts CreateApplicationOpts) (ApplicationResponse, ApplicationErrorResponse, error)

CreateApplication creates a new application

func (*ApplicationClient) DeleteApplication Uses

func (client *ApplicationClient) DeleteApplication(app_id string) (bool, ApplicationErrorResponse, error)

Delete application deletes an application

func (*ApplicationClient) GetApplication Uses

func (client *ApplicationClient) GetApplication(app_id string) (ApplicationResponse, ApplicationErrorResponse, error)

GetApplication returns one application, by app ID

func (*ApplicationClient) GetApplications Uses

func (client *ApplicationClient) GetApplications(opts GetApplicationsOpts) (ApplicationResponseCollection, ApplicationErrorResponse, error)

List your Applications

func (*ApplicationClient) UpdateApplication Uses

func (client *ApplicationClient) UpdateApplication(id string, name string, opts UpdateApplicationOpts) (ApplicationResponse, ApplicationErrorResponse, error)

UpdateApplication updates an existing application

type ApplicationErrorResponse Uses

type ApplicationErrorResponse struct {
    Type     string `json:"type,omitempty"`
    Title    string `json:"title,omitempty"`
    Detail   string `json:"detail,omitempty"`
    Instance string `json:"instance,omitempty"`
}

ApplicationErrorResponse respresents error responses

type ApplicationKeys Uses

type ApplicationKeys struct {
    PublicKey string `json:"public_key,omitempty"`
}

type ApplicationMessages Uses

type ApplicationMessages struct {
    Webhooks ApplicationMessagesWebhooks `json:"webhooks,omitempty"`
}

type ApplicationMessagesWebhooks Uses

type ApplicationMessagesWebhooks struct {
    InboundUrl ApplicationUrl `json:"inbound_url,omitempty"`
    StatusUrl  ApplicationUrl `json:"status_url,omitempty"`
}

type ApplicationResponse Uses

type ApplicationResponse struct {
    Id           string
    Name         string
    Capabilities application.ApplicationResponseCapabilities
    Keys         application.ApplicationResponseKeys
}

type ApplicationResponseCollection Uses

type ApplicationResponseCollection struct {
    PageSize   int32
    Page       int32
    TotalItems int32
    TotalPages int32
    Embedded   ApplicationResponseCollectionEmbedded
}

type ApplicationResponseCollectionEmbedded Uses

type ApplicationResponseCollectionEmbedded struct {
    Applications []ApplicationResponse
}

type ApplicationRtc Uses

type ApplicationRtc struct {
    Webhooks ApplicationRtcWebhooks `json:"webhooks,omitempty"`
}

type ApplicationRtcWebhooks Uses

type ApplicationRtcWebhooks struct {
    EventUrl ApplicationUrl `json:"event_url,omitempty"`
}

type ApplicationUrl Uses

type ApplicationUrl struct {
    Address    string `json:"address,omitempty"`
    HttpMethod string `json:"http_method,omitempty"`
}

type ApplicationVbc Uses

type ApplicationVbc struct {
}

type ApplicationVoice Uses

type ApplicationVoice struct {
    Webhooks ApplicationVoiceWebhooks `json:"webhooks,omitempty"`
}

type ApplicationVoiceWebhooks Uses

type ApplicationVoiceWebhooks struct {
    AnswerUrl         ApplicationUrl `json:"answer_url,omitempty"`
    FallbackAnswerUrl ApplicationUrl `json:"fallback_answer_url,omitempty"`
    EventUrl          ApplicationUrl `json:"event_url,omitempty"`
}

type Auth Uses

type Auth interface {
    GetCreds() []string
}

Auth types are various but support a common interface

type CallFrom Uses

type CallFrom struct {
    Type   string
    Number string
}

CallFrom details of the caller

type CallTo Uses

type CallTo struct {
    Type       string
    Number     string
    DtmfAnswer string
}

CallTo details of the callee

type CreateApplicationOpts Uses

type CreateApplicationOpts struct {
    Keys         ApplicationKeys
    Capabilities ApplicationCapabilities
}

CreateApplicationOpts holds the optional values for a CreateApplication operation

type CreateApplicationRequestOpts Uses

type CreateApplicationRequestOpts struct {
    Name         string                  `json:"name,omitempty"`
    Keys         *ApplicationKeys        `json:"keys,omitempty"`
    Capabilities ApplicationCapabilities `json:"capabilities,omitempty"`
}

CreateApplicationRequestOpts the data structure to send to the API calling code, used inside CreateApplication rather than as an incoming argument

type CreateCallOpts Uses

type CreateCallOpts struct {
    From             CallFrom
    To               CallTo
    Ncco             ncco.Ncco
    AnswerUrl        []string
    AnswerMethod     string
    EventUrl         []string
    EventMethod      string
    MachineDetection string
    LengthTimer      int32
    RingingTimer     int32
}

CreateCallOpts: Options for creating a call

type GetApplicationsOpts Uses

type GetApplicationsOpts struct {
    PageSize int32
    Page     int32
}

type JWTAuth Uses

type JWTAuth struct {
    JWT string
}

JWTAuth is an Auth type to represent a JWT token

func CreateAuthFromAppPrivateKey Uses

func CreateAuthFromAppPrivateKey(appID string, privateKey []byte) (*JWTAuth, error)

CreateAuthFromAppPrivateKey is a helper method to generate auth from an Application ID and a []byte of the private key (use with ioutil.ReadFile)

func CreateAuthFromJwtTokenGenerator Uses

func CreateAuthFromJwtTokenGenerator(generator jwt.Generator) *JWTAuth

CreateAuthFromJwtTokenGenerator accepts a token generator struct, use this to set more of the options on the generator.

func (*JWTAuth) GetCreds Uses

func (auth *JWTAuth) GetCreds() []string

GetCreds returns an array of strings, this time just one element which is the JWT token

type KeySecretAuth Uses

type KeySecretAuth struct {
    // contains filtered or unexported fields
}

KeySecretAuth is an Auth type to represent the API key and API secret combination

func CreateAuthFromKeySecret Uses

func CreateAuthFromKeySecret(apiKey string, apiSecret string) *KeySecretAuth

CreateAuthFromKeySecret returns an Auth type given an API key and API secret

func (*KeySecretAuth) GetCreds Uses

func (auth *KeySecretAuth) GetCreds() []string

GetCreds gives an array of credential strings

type ModifyCallOpts Uses

type ModifyCallOpts struct {
    Action string `json:"action"`
}

type ModifyCallResponse Uses

type ModifyCallResponse struct {
    Status string
}

type NiErrorResponse Uses

type NiErrorResponse struct {
    Status        int32
    StatusMessage string
}

type NiOpts Uses

type NiOpts struct {
    Country string
}

type NiResponseAsync Uses

type NiResponseAsync struct {
    RequestId        string
    Number           string
    RemainingBalance string
    RequestPrice     string
    Status           numberinsight.NiStandardAdvancedStatus
    StatusMessage    string
}

type NiResponseJsonBasic Uses

type NiResponseJsonBasic struct {
    Status                    numberinsight.NiBasicStatus
    StatusMessage             string
    RequestId                 string
    InternationalFormatNumber string
    NationalFormatNumber      string
    CountryCode               string
    CountryCodeIso3           string
    CountryName               string
    CountryPrefix             string
}

type NiResponseJsonStandard Uses

type NiResponseJsonStandard struct {
    Status                    numberinsight.NiBasicStatus
    StatusMessage             string
    RequestId                 string
    InternationalFormatNumber string
    NationalFormatNumber      string
    CountryCode               string
    CountryCodeIso3           string
    CountryName               string
    CountryPrefix             string
    RequestPrice              string
    RefundPrice               string
    RemainingBalance          string
    CurrentCarrier            numberinsight.NiCurrentCarrierProperties
    OriginalCarrier           numberinsight.NiInitialCarrierProperties
    Ported                    string
    Roaming                   numberinsight.NiRoaming
    CallerIdentity            numberinsight.NiCallerIdentity
    CallerName                string
    LastName                  string
    FirstName                 string
    CallerType                string
}

type NumberAvailable Uses

type NumberAvailable struct {
    Country  string
    Msisdn   string
    Type     string
    Cost     string
    Features []string
}

type NumberBuyOpts Uses

type NumberBuyOpts struct {
    TargetAPIKey string
}

NumberBuyOpts enables users to set the Target API Key (and any future params)

type NumberCancelOpts Uses

type NumberCancelOpts struct {
    TargetAPIKey string
}

NumberCancelOpts enables users to set the Target API Key (and any future params)

type NumberCollection Uses

type NumberCollection struct {
    Count   int32
    Numbers []NumberDetail
}

type NumberDetail Uses

type NumberDetail struct {
    Country               string
    Msisdn                string
    MoHttpUrl             string
    Type                  string
    Features              []string
    MessagesCallbackType  string
    MessagesCallbackValue string
    VoiceCallbackType     string
    VoiceCallbackValue    string
}

type NumberInsightClient Uses

type NumberInsightClient struct {
    Config *numberinsight.Configuration
    // contains filtered or unexported fields
}

NumberInsightClient for working with the NumberInsight API

func NewNumberInsightClient Uses

func NewNumberInsightClient(Auth Auth) *NumberInsightClient

NewNumberInsightClient Creates a new NumberInsight Client, supplying an Auth to work with

func (*NumberInsightClient) AdvancedAsync Uses

func (client *NumberInsightClient) AdvancedAsync(number string, callback string, opts NiOpts) (NiResponseAsync, NiErrorResponse, error)

AdvancedAsync requests a callback with advanced-level information about a number

func (*NumberInsightClient) Basic Uses

func (client *NumberInsightClient) Basic(number string, opts NiOpts) (NiResponseJsonBasic, NiErrorResponse, error)

Basic does a basic-level lookup for data about a number

func (*NumberInsightClient) Standard Uses

func (client *NumberInsightClient) Standard(number string, opts NiOpts) (NiResponseJsonStandard, NiErrorResponse, error)

Standard does a Standard-level lookup for data about a number

type NumberSearch Uses

type NumberSearch struct {
    Count   int32
    Numbers []NumberAvailable
}

type NumberSearchOpts Uses

type NumberSearchOpts struct {
    Type          string
    Features      string
    Pattern       string
    SearchPattern int32
    Size          int32
    Index         int32
}

NumberSearchOpts sets the optional values in the Search method

type NumberUpdateOpts Uses

type NumberUpdateOpts struct {
    AppID                 string
    MoHTTPURL             string
    VoiceCallbackType     string
    VoiceCallbackValue    string
    VoiceStatusCallback   string
    MessagesCallbackType  string
    MessagesCallbackValue string
}

NumberUpdateOpts sets all the various fields for the number config

type NumbersClient Uses

type NumbersClient struct {
    Config *number.Configuration
    // contains filtered or unexported fields
}

NumbersClient for working with the Numbers API

func NewNumbersClient Uses

func NewNumbersClient(Auth Auth) *NumbersClient

NewNumbersClient Creates a new Numbers Client, supplying an Auth to work with

func (*NumbersClient) Buy Uses

func (client *NumbersClient) Buy(country string, msisdn string, opts NumberBuyOpts) (NumbersResponse, NumbersErrorResponse, error)

Buy the best phone number to use in your app

func (*NumbersClient) Cancel Uses

func (client *NumbersClient) Cancel(country string, msisdn string, opts NumberCancelOpts) (NumbersResponse, NumbersErrorResponse, error)

Cancel a number already in your account

func (*NumbersClient) List Uses

func (client *NumbersClient) List(opts NumbersOpts) (NumberCollection, NumbersErrorResponse, error)

List shows the numbers you already own, filters and pagination are available

func (*NumbersClient) Search Uses

func (client *NumbersClient) Search(country string, opts NumberSearchOpts) (NumberSearch, NumbersErrorResponse, error)

Search lets you find a great phone number to use in your application

func (*NumbersClient) Update Uses

func (client *NumbersClient) Update(country string, msisdn string, opts NumberUpdateOpts) (NumbersResponse, NumbersErrorResponse, error)

Update the configuration for your number

type NumbersErrorResponse Uses

type NumbersErrorResponse struct {
    ErrorCode      string `json:"error-code,omitempty"`
    ErrorCodeLabel string `json:"error-code-label,omitempty"`
}

NumbersErrorResponse is the error format for the Numbers API

type NumbersOpts Uses

type NumbersOpts struct {
    ApplicationID  string
    HasApplication string // string because it's tri-state, not boolean
    Country        string
    Pattern        string
    SearchPattern  int32
    Size           int32
    Index          int32
}

NumbersOpts sets the options to use in finding the numbers already in the user's account

type NumbersResponse Uses

type NumbersResponse struct {
    ErrorCode      string `json:"error-code,omitempty"`
    ErrorCodeLabel string `json:"error-code-label,omitempty"`
}

NumbersResponse is the response format for the Numbers API

type PlayAudioOpts Uses

type PlayAudioOpts struct {
    Loop  string
    Level int
}

type PlayTtsOpts Uses

type PlayTtsOpts struct {
    Text      string
    Loop      int32
    Level     string
    VoiceName string
}

type SMSClient Uses

type SMSClient struct {
    Config *sms.Configuration
    // contains filtered or unexported fields
}

SMSClient for working with the SMS API

func NewSMSClient Uses

func NewSMSClient(Auth Auth) *SMSClient

NewSMSClient Creates a new SMS Client, supplying an Auth to work with

func (*SMSClient) Send Uses

func (client *SMSClient) Send(from string, to string, text string, opts SMSOpts) (Sms, SmsErrorResponse, error)

Send an SMS. Give some text to send and the number to send to - there are some restrictions on what you can send from, to be safe try using a Vonage number associated with your account

type SMSOpts Uses

type SMSOpts struct {
    StatusReportReq bool
    Callback        string
    Type            string
    ClientRef       string
}

SMSOpts holds all the optional values that can be set when sending an SMS, check the https://developer.nexmo.com/api/sms API reference for more information

type Sms Uses

type Sms struct {
    // The amount of messages in the request
    MessageCount string
    Messages     []sms.Message
}

type SmsError Uses

type SmsError struct {
    Status    string `json:"status"`
    ErrorText string `json:"error-text"`
}

type SmsErrorResponse Uses

type SmsErrorResponse struct {
    MessageCount string
    Messages     []SmsError
}

type TransferCallOpts Uses

type TransferCallOpts struct {
    Uuid      string
    Ncco      ncco.Ncco
    AnswerUrl []string
}

TransferCallOpts: Options for transferring a call

type TransferDestinationNcco Uses

type TransferDestinationNcco struct {
    Type string    `json:"type"`
    Ncco ncco.Ncco `json:"ncco"`
}

type TransferDestinationUrl Uses

type TransferDestinationUrl struct {
    Type string   `json:"type"`
    Url  []string `json:"url"`
}

type TransferWithNccoOpts Uses

type TransferWithNccoOpts struct {
    Action      string                  `json:"action"`
    Destination TransferDestinationNcco `json:"destination"`
}

type TransferWithUrlOpts Uses

type TransferWithUrlOpts struct {
    Action      string                 `json:"action"`
    Destination TransferDestinationUrl `json:"destination"`
}

type UpdateApplicationOpts Uses

type UpdateApplicationOpts struct {
    Keys         ApplicationKeys
    Capabilities ApplicationCapabilities
}

UpdateApplicationOpts holds the optional values for a UpdateApplication operation

type UpdateApplicationRequestOpts Uses

type UpdateApplicationRequestOpts struct {
    Name         string                  `json:"name,omitempty"`
    Keys         *ApplicationKeys        `json:"keys,omitempty"`
    Capabilities ApplicationCapabilities `json:"capabilities,omitempty"`
}

UpdateApplicationRequestOpts the data structure to send to the API calling code, used inside UpdateApplication rather than as an incoming argument

type VerifyCheckResponse Uses

type VerifyCheckResponse struct {
    RequestId                  string
    EventId                    string
    Status                     string
    Price                      string
    Currency                   string
    EstimatedPriceMessagesSent string
}

type VerifyClient Uses

type VerifyClient struct {
    Config *verify.Configuration
    // contains filtered or unexported fields
}

VerifyClient for working with the Verify API

func NewVerifyClient Uses

func NewVerifyClient(Auth Auth) *VerifyClient

NewVerifyClient Creates a new Verify Client, supplying an Auth to work with

func (*VerifyClient) Cancel Uses

func (client *VerifyClient) Cancel(requestID string) (VerifyControlResponse, VerifyErrorResponse, error)

Cancel an in-progress request (check API docs for when this is possible)

func (*VerifyClient) Check Uses

func (client *VerifyClient) Check(requestID string, code string) (VerifyCheckResponse, VerifyErrorResponse, error)

Check the user-supplied code for this request ID

func (*VerifyClient) Psd2 Uses

func (client *VerifyClient) Psd2(number string, payee string, amount float64, opts VerifyPsd2Opts) (VerifyRequestResponse, VerifyErrorResponse, error)

Psd2 requests a user confirm a payment with amount and payee

func (*VerifyClient) Request Uses

func (client *VerifyClient) Request(number string, brand string, opts VerifyOpts) (VerifyRequestResponse, VerifyErrorResponse, error)

Request a number is verified for ownership

func (*VerifyClient) Search Uses

func (client *VerifyClient) Search(requestID string) (VerifySearchResponse, VerifyErrorResponse, error)

Search for an earlier request by id

func (*VerifyClient) TriggerNextEvent Uses

func (client *VerifyClient) TriggerNextEvent(requestID string) (VerifyControlResponse, VerifyErrorResponse, error)

TriggerNextEvent moves on to the next event in the workflow

type VerifyControlResponse Uses

type VerifyControlResponse struct {
    Status  string
    Command string
}

type VerifyErrorResponse Uses

type VerifyErrorResponse struct {
    RequestId string `json:"request_id"`
    Status    string `json:"status"`
    ErrorText string `json:"error_text,omitempty"`
}

type VerifyOpts Uses

type VerifyOpts struct {
    Country       string
    SenderID      string
    CodeLength    int32
    Lg            string
    PinExpiry     int32
    NextEventWait int32
    WorkflowID    int32
}

VerifyOpts holds all the optional arguments for the verify request function

type VerifyPsd2Opts Uses

type VerifyPsd2Opts struct {
    Country       string
    CodeLength    int32
    Lg            string
    PinExpiry     int32
    NextEventWait int32
    WorkflowID    int32
}

VerifyPsd2Opts holds all the optional arguments for the verify psd2 function

type VerifyRequestResponse Uses

type VerifyRequestResponse struct {
    // The unique ID of the Verify request. You need this `request_id` for the Verify check.
    RequestId string
    Status    string
}

type VerifySearchResponse Uses

type VerifySearchResponse struct {
    RequestId                  string
    AccountId                  string
    Status                     string
    Number                     string
    Price                      string
    Currency                   string
    SenderId                   string
    DateSubmitted              string
    DateFinalized              string
    FirstEventDate             string
    LastEventDate              string
    Checks                     []verify.SearchResponseChecks
    Events                     []verify.SearchResponseEvents
    EstimatedPriceMessagesSent string
}

type VoiceClient Uses

type VoiceClient struct {
    Config *voice.Configuration
    JWT    string
}

VoiceClient for working with the Voice API

func NewVoiceClient Uses

func NewVoiceClient(Auth Auth) *VoiceClient

NewVoiceClient Creates a new Voice Client, supplying an Auth to work with

func (*VoiceClient) CreateCall Uses

func (client *VoiceClient) CreateCall(opts CreateCallOpts) (voice.CreateCallResponse, VoiceErrorResponse, error)

CreateCall Makes a phone call given the from/to details and an NCCO or an Answer URL

func (*VoiceClient) Earmuff Uses

func (client *VoiceClient) Earmuff(uuid string) (ModifyCallResponse, VoiceErrorResponse, error)

Earmuff wraps the Modify Call API endpoint

func (*VoiceClient) GetCall Uses

func (client *VoiceClient) GetCall(uuid string) (voice.GetCallResponse, VoiceErrorResponse, error)

GetCall for the details of a specific call

func (*VoiceClient) GetCalls Uses

func (client *VoiceClient) GetCalls() (voice.GetCallsResponse, VoiceErrorResponse, error)

List your calls

func (*VoiceClient) Hangup Uses

func (client *VoiceClient) Hangup(uuid string) (ModifyCallResponse, VoiceErrorResponse, error)

Hangup wraps the Modify Call API endpoint

func (*VoiceClient) Mute Uses

func (client *VoiceClient) Mute(uuid string) (ModifyCallResponse, VoiceErrorResponse, error)

Mute wraps the Modify Call API endpoint

func (*VoiceClient) PlayAudioStream Uses

func (client *VoiceClient) PlayAudioStream(uuid string, streamUrl string, opts PlayAudioOpts) (voice.StartStreamResponse, VoiceErrorResponse, error)

PlayAudioStream starts an audio file from a URL playing in a call

func (*VoiceClient) PlayDtmf Uses

func (client *VoiceClient) PlayDtmf(uuid string, dtmf string) (voice.DtmfResponse, VoiceErrorResponse, error)

PlayDTMF starts playing a string of DTMF digits into the call

func (*VoiceClient) PlayTts Uses

func (client *VoiceClient) PlayTts(uuid string, text string, opts PlayTtsOpts) (voice.StartTalkResponse, VoiceErrorResponse, error)

PlayTts starts playing TTS into the call

func (*VoiceClient) StopAudioStream Uses

func (client *VoiceClient) StopAudioStream(uuid string) (voice.StopStreamResponse, VoiceErrorResponse, error)

StopAudioStream stops the currently-playing audio stream

func (*VoiceClient) StopTts Uses

func (client *VoiceClient) StopTts(uuid string) (voice.StopTalkResponse, VoiceErrorResponse, error)

StopTts stops the current TTS from playing

func (*VoiceClient) TransferCall Uses

func (client *VoiceClient) TransferCall(opts TransferCallOpts) (ModifyCallResponse, VoiceErrorResponse, error)

TransferCall wraps the Modify Call API endpoint

func (*VoiceClient) Unearmuff Uses

func (client *VoiceClient) Unearmuff(uuid string) (ModifyCallResponse, VoiceErrorResponse, error)

Unearmuff wraps the Modify Call API endpoint

func (*VoiceClient) Unmute Uses

func (client *VoiceClient) Unmute(uuid string) (ModifyCallResponse, VoiceErrorResponse, error)

Unmute wraps the Modify Call API endpoint

type VoiceErrorGeneralResponse Uses

type VoiceErrorGeneralResponse struct {
    Type  string `json:"type,omitempty"`
    Title string `json:"error_title,omitempty"`
}

VoiceErrorGeneralResponse covers some common error types that come from the webserver/gateway rather than the API itself

type VoiceErrorInvalidParamsResponse Uses

type VoiceErrorInvalidParamsResponse struct {
    Type              int                 `json:"type,omitempty"`
    Title             string              `json:"title,omitempty"`
    Detail            string              `json:"detail,omitempty"`
    Instance          string              `json:"instance,omitempty"`
    InvalidParameters []map[string]string `json:"invalid_parameters,omitempty"`
}

VoiceErrorInvalidParamsResponse can come with a 400 response if it is caused by some invalid_parameters

type VoiceErrorResponse Uses

type VoiceErrorResponse struct {
    Error interface{}
}

VoiceErrorResponse is a container for error types since we can get more than one type of error back and they have incompatible data types

Directories

PathSynopsis
jwt
ncco
numbers
verify

Package vonage imports 15 packages (graph). Updated 2020-11-20. Refresh now. Tools for package owners.