A Node.js wrapper for interacting with the Roblox Message Router API.
About • Installation • Docs • Credits
About
RbxMessagingService is a node module that That allows you to use MessagingService outside of Roblox.
This project was created because people outside ROBLOX always want to use MessagingService outside ROBLOX.
RbxMessagingService allows you to do things you would normally do on the Roblox MessagingService through a Node.js interface.
Installation
With node.js installed simply run:
# Run this to install RbxMessagingService locally to your repository.
$ npm install @mfd/rbxmessagingservice --save
# Run this instead to install RbxMessagingService globally so you can use it anywhere.
$ npm install @mfd/rbxmessagingservice -g
That’s it!
Documentation
You can find the current RbxMessagingService documentation here (Roblox Wiki) or here (API Reference)
Initial setup
-
Run
RbxMessagingService.InitializeAsync
with the parameters ofCookie
andPlaceId
. This will store your cookie internally and validate it, but will perform no cookie refresh automatically, it also requires that your cookie have the warning and be valid. -
While this works, Roblox
.ROBLOSECURITY
cookies expire after 30 years of first authenticating them. -
You need to store this new cookie somewhere - whether it be in a database, or a JSON file.
Note: By default, InitializeAsync will validate the cookie you provide by making a HTTP request.
Example
This example makes use of the new async-await syntax.
const { MessagingService, InitializeAsync } = require('@mfd/rbxmessagingservice');
async function startApp() {
await InitializeAsync(
'_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_...',
123,
);
// Do everything else, calling functions and the like.
await MessagingService.SubscribeAsync('TopicExample', function (message, sent) {
console.log(`Message for TopicExample: ${message}, sent at: ${sent}`);
});
await MessagingService.PublishAsync('TopicExample', 'Some EPIC data!');
}
So yeah, I made this, it is a wrapper for MessagingService, people thought it was impossible, the only issue is that it only works for Studio communication, because I have no idea what the release X-Roblox-ChannelType is. If anyone knows what it is, help me. But here you go anyway!