What is the Robin User Token (RUT)?
Just like in your company’s database, every employee has a unique identifier; in many cases, this identifier is referred to as an ID — the same logic is applied to Robin but with a different name. The Robin User Token (RUT) is used to identify every user that dispatches or receives messages and events in your Robin App.
When to use a RUT
The Robin User Token must be used for any messaging operation on Robin, as it is a means of identification for any user. Sending messages with an invalid token or without a token would result in a “No Identity” record of your Robin Dashboard. The RUT also helps with the visibility of individual and group messaging activities.
The RUT is a necessary prerequisite to building any Robin use case; any application of Robin might not function to its full potential without a valid RUT.
Creating a valid RUT
Recall that a RUT is synonymous with an ID field in a database; hence, the RUT is mapped to metadata for a unique user; this metadata is used to create the RUT. The metadata is a key-value pair (an object) that can contain as much information about a user.
Creating a valid RUT is easy; it can be done on the server (back-end) or on the client side (front-end).
Javascript
const robin = new Robin('YOUR_API_KEY', true)
const response = await robin.**createUserToken**({
meta_data: {
username: 'USER_NAME',
},
});Go
Dart
Python
To install Robin packages and libraries referenced in the code snippets above, check out Samples and Resources
Last updated
Was this helpful?