Skip to content

Sample Go application demonstrating how to send RCS text messages with the Vonage Messages API. Includes JWT authentication implementation and environment configuration. Companion code for a step-by-step tutorial on building rich, interactive messaging capabilities in Go applications.

Notifications You must be signed in to change notification settings

Vonage-Community/tutorial-messages-go-rcs_text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Send RCS Text Messages with Go and the Vonage Messages API

Sample Go application demonstrating how to send RCS text messages with the Vonage Messages API. Includes JWT authentication implementation and environment configuration. Companion code for a step-by-step tutorial on building rich, interactive messaging capabilities in Go applications.

How to Send RCS Text Messages with Go

A Go application that allows you to send iRch Communications Services(RCS) text messages.

You can find full step-by-step instructions on the Vonage Developer Blog.

Prerequisites

  1. Go 1.18+ installed
  2. ngrok installed for exposing your local server to the internet.
  3. Vonage Developer Account
  4. A registered RCS Business Messaging (RBM) Agent.
  5. A phone with RCS capabilities for testing.

Instructions

  1. Clone this repo
  2. Initialize your Go application and install dependencies:
go mod init rcs-text-golang
go get github.com/joho/godotenv github.com/golang-jwt/jwt/v4
  1. Rename the .env.example file to .env, and add your VONAGE_APPLICATION_ID and RCS_SENDER_ID values.
  2. Add your private.key file in the root of the project directory.
  3. Start your Node server:
go run main.go
  1. Create a tunnel using ngrok:
ngrok http 3000
  1. Test your app by sending an RCS suggested reply from the command line:
curl -X POST https://YOUR_NGROK_URL/send-rcs-carousel \
  -H "Content-Type: application/json" \
  -d '{"to": "YOUR_RCS_TEST_NUMBER"}'

About

Sample Go application demonstrating how to send RCS text messages with the Vonage Messages API. Includes JWT authentication implementation and environment configuration. Companion code for a step-by-step tutorial on building rich, interactive messaging capabilities in Go applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages