Vonage

Send and Receive SMS In Go With Vonage

The code found in main.go provides two urls /send-sms and /webhook/inbound-sms. Triggering /send-sms will send an SMS to the To number defined in .env.

Table of Contents

Prerequisites

Getting Started

Clone the Repository

Run the following two commands to clone this repository and change directory into the repository directory.

git clone https://github.com/GregHolmes/send-and-receive-sms-in-go-with-vonage
cd send-and-receive-sms-in-go-with-vonage

Credentials

Rename the .env.example file to .env and populate the values. The VONAGE_API_KEY and VONAGE_API_SECRET can be found on your Dashboard.

VONAGE_API_KEY=
VONAGE_API_SECRET=
FROM=<Your Vonage number>
TO=<The recipients number>

Install Third Party Libraries

To install the libraries used, run the following commands:

	go get github.com/gorilla/mux
	go get github.com/gorilla/schema
	go get github.com/joho/godotenv
	go get github.com/nexmo-community/nexmo-go

Test Run the Application

Go to: http://localhost:8080/send-sms in your browser, if configured correctly, you should have sent yourself an SMS. Check your phone!

Code of Conduct

In the interest of fostering an open and welcoming environment, we strive to make participation in our project and our community a harassment-free experience for everyone. Please check out our Code of Conduct in full.

Contributing

We ❤️ contributions from everyone! Check out the Contributing Guidelines for more information.

contributions welcome

License

This project is subject to the MIT License