Web Service: Getting a Room’s Direct Link

You are here:

This short post explains how to utilize RumbleTalk’s Web Service to get your room’s current server.

Every chat is associated with a specific server. Normally servers are constant but in some cases, servers are being changed (Atttach, upgrade, beta, new features…etc).

We use the publicly available path:

https://rumbletalk.com/client/service.php

And append to it the ?hash= parameter with the room’s public id (AKA the chat’s hash)

e.g. https://rumbletalk.com/client/service.php?hash=B4akfG9R

The web service has an open CORS policy and can be accessed directly from the browser.

The response will be a JSON of the following structure

{
“status”: boolean,
“address”: string
}

Where “status” is true if the room has an assigned server; i.e. the room exists.

And the address will be the assigned server’s domain; e.g. “service9.rumbletalk.net”

Using the result you can then display the room in, for example, an iframe built in PHP like so:

<?php
$hash = ‘YOUR_HASH_HERE’;
$response = file_get_contents(“https://rumbletalk.com/client/service.php?hash={$hash}“);
$response = json_decode($response, true);
?>
<iframe src=”https://<?= $response[‘address’] ?>/<?= $hash ?>/”></iframe>

Share Button

Categories