Skip to main content

How to Build a Virtual Situation Room with Eyeson (Part 4)

· 3 min read
Stefan Steinbauer

Permalinks in Eyeson allow developers to create pre-defined meeting rooms with shareable and permanent guest links, enabling meeting setup and invitation distribution before the actual meeting starts.

Now, let's explore permalinks in more depth:

Permalinks address a common need among developers: the ability to share meeting links before the meeting is actually created. Previously, Eyeson API only allowed immediate meeting creation, but with the Permalink API, you can now pre-define meeting rooms and share guest links in advance.

To create a permalink, use the following API endpoint:

POST /permalink
HEADERS Authorization
user[name]=<host-user-name>
# options[exit_url] and many more options

This request will return a response containing the necessary links:

{
// ...
"links": {
"gui": "https://app.eyeson.team/permalink/?9clgjJXl1NzbcmF5vfXWhAVJ",
"guest_join": "https://app.eyeson.team/permalink/?guest=R2SdUxiqKhpBoUu0oi0pZZkZ"
}
}
caution

It's crucial to keep the host user GUI links secret and only share guest links.

Prebuilt UI vs. Custom UI

Eyeson provides links for both prebuilt UI and custom UI implementations. The prebuilt UI works out-of-the-box, while the custom UI offers more control through additional API endpoints.

Process for Custom UI

When using custom UI, follow these steps:

  1. Create a permalink and store its user-token and guest-token.
  2. Allow meeting hosts to start the meeting at any time using the user-token.
  3. Let guests wait until the meeting is running, then join using the guest-token

You can update permalink settings or register additional host users after creation:

PUT /permalink/<permalink-id>
HEADERS Authorization
options[recording_available]=false
# options[exit_url] and many more options

To add new host users:

POST /permalink/<permalink-id>/users
HEADERS Authorization
user[name]=<new-host-user-name>

The API provides details about the permalink, including its current running state, layout settings, and custom fields. This information is crucial for integrating permalinks with your custom UI.

Integration with Eyeson IFrame API

For easy integration of Eyeson video conferencing into your website or app, you can use the IFrame API. This involves including the API script, providing an HTML container, and initializing the EyesonIframe function:

<script src="https://app.eyeson.team/iframe-api.js"></script>
<div id="meeting"></div>
<script>
new EyesonIframe('#meeting', { accessKey: '...' });
</script>

The IFrame API also offers advanced features for interacting with the Eyeson UI and observing meeting events.

By leveraging permalinks and the IFrame API, you can create a seamless video conferencing experience within your application, allowing for pre-scheduled meetings and easy participant invitations.

<script src="https://app.eyeson.team/iframe-api.js"></script>
<div id="meeting"></div>
<script>
const permalinkGuestToken = 'HoYq1gudkP9D7NXF6ERTnd05';
new EyesonIframe('#meeting', {
isPermalink: true,
guest: { token: permalinkGuestToken }
});
</script>