These code samples are meant to be used for https://developer.nexmo.com/, and are structured in such a way as to be used for internal testing with the focus of one goal. For example, sending an SMS, receiving an SMS via an incoming SMS webhook or making a Text-to-speech voice call. Developers are free to use these code snippets as a reference, but these may require changes to be worked into your specific application. We recommend checking out the Vonage API Developer Website, which displays these code snippets in a more copy/paste fashion.
There are also quickstarts available for: Python, .NET, Node.js, PHP, Ruby and cURL.
- Sign up for a Vonage API account if you don't have one already.
- Copy
.env-example
to.env
and update the values for your own credentials and other details. - You will need to buy a number to use with many of these examples.
- Some snippets (the ones with incoming webhooks or callbacks) will need Ngrok to be used on your local machine. You can read more about Ngrok on our developer portal.
- Run each snippet by navigating to its directory and then running
go run [file]
.
We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:
- Open an issue on this repository
- Tweet at us! We're @VonageDev on Twitter
- Or join the Vonage Developer Community Slack
- Check out the Developer Documentation at https://developer.nexmo.com for more detailed information and API reference.
- Check out this blog post on Sending an SMS to get started.
- The code samples in this repository are under MIT