Javascript
Last updated
Last updated
Add live messaging to your Javascript applications with the Core Javascript SDK. Take advantage of the Robin API and deploy messaging solutions in very little time.
For this integration, you would need an API Key - Learn about how to get your API Keys in Setting up your Robin account
Follow the step-by-step instructions below to send your first message using the Javascript SDK
To create a Robin
instance, pass the apiKey
as the first argument, and the optional tls
argument as the second in the Robin(apiKey, tls)
constructor.
Initializing the Chat SDK at the top of your Javascript file is recommended.
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.
All messages sent on Robin go through channels, you can learn more about channels on Robin Fundamentals
Before sending a message, you need to create a Conversation
Now, you can send a message to a conversation with the robin.sendMessageToConversation()
method.
This SDK is supported on the following browser versions.
Internet Explorer
10 or higher
Edge
13 or higher
Chrome
16 or higher
Firefox
11 or higher
Safari
7 or higher
Opera
12.1 or higher
iOS Safari
7 or higher
Android Browser
4.4 (Kitkat) or higher