Go

Robin for Messaging with Go

Add live messaging to your Go applications with the Core Go SDK. Take advantage of the Robin API and deploy messaging solutions in very little time.

Prerequisites

The following are required to use the SDK:

  1. Go 1.1.6 or greater is required

  2. API Key - Learn about how to get your API Keys in Setting up your Robin account

Install the Go SDK

Sending your first message

Follow the step-by-step instructions below to send your first message using the Go SDK

Step 1: Create a Robin Instance

To create a Robin instance, pass the Secret as the first argument, and the optional Tls argument as the second in the Robin(Secret, Tls) constructor.

circle-exclamation

Step 2: Connect to Robin Server

You can connect to the Robin server using the Connect(user_token) method from the Robin instance. If you do not have a Robin User Token (user_token), you would have to create one. What is the Robin User Token (RUT)?(specific link to create user token) is a good place to start.

circle-info

All messages sent on Robin go through channels, you can learn more about channels on Robin Fundamentals

Step 3: Create a Conversation

Before sending a message, you need to create a Conversation

Step 4: Send a message to Conversation

Now, you can send a message to a conversation with the robin.SendMessage() method.

Last updated