Join Room Token API

The Huddle01 API provides the ability to create rooms for hosting various communication experiences. In order to use the API, you will need to obtain an API key by connecting to your wallet.

Endpoint

GET

https://api.huddle01.com/api/v1/join-room-token

The Join Room Token API is used for the creation of tokens that can be used to join a room from an iframe. These tokens are valid for a period of 30 minutes, making them the perfect way to ensure secure and controlled access to your meeting or event. By using the Join Room Token API, users can join a room as either a host or a guest, depending on their requirements.


This flexibility ensures that all participants have the access they need to make the most of the meeting or event. One of the key benefits of the Join Room Token API is that it can autopopulate metadata such as displayName and avatarUrl. This makes it easier for participants to join the meeting or event with the correct details, without having to manually enter them each time.

POST
/join-room-token

Join Room Token API

The API supports a POST request with the following required parameters:

  • roomId - The RoomId of the room, for which you need to get the details.
  • userType - The type of user joining the room. Can be either host or guest.
Request
POST • /join-room-token
const response = await axios.post(
  'https://api.huddle01.com/api/v1/join-room-token',
  {
      roomId: "jkb-yqis-bqg",
      userType: "host"
  },
  {
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': {{API_KEY}},
    },
  }
);
Response

Upon success, the API will return a response with the following fields:

  • token - The Token which can be used to join the room.
  • hostUrl - The host url of the room created.
  • redirectUrl - The redirect url of the room created, should be embeded in an iframe.

In case of an error, the API will return an error message with a corresponding status code.

Response
{
    token: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb29tSWQiOiJqa2IteXFpcy1icWciLCJ1c2VyVHlwZSI6Imd1ZXN0IiwiZ3Vlc3RBc0hvc3QiOmZhbHNlLCJob3N0TmFtZSI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCIsImlhdCI6MTY4MTM4NTAzMCwiZXhwIjoxNjgxNjQ0MjMwfQ',
    hostUrl: 'http://localhost:3000',
    redirectUrl: 'http://localhost:3000/jkb-yqis-bqg/token?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb29tSWQiOiJqa2IteXFpcy1icWciLCJ1c2VyVHlwZSI6Imd1ZXN0IiwiZ3Vlc3RBc0hvc3QiOmZhbHNlLCJob3N0TmFtZSI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCIsImlhdCI6MTY4MTM4NTAzMCwiZXhwIjoxNjgxNjQ0MjMwfQ',
}

Request

ParamsDefinitionData TypeMandatory
roomIdThe RoomId of the room, for which you need to get the details.stringY
displayNameThe display name of the user, who is joining the room.stringY
userTypeThe type of the user, who is joining the room. The possible values are host and guest.'host' | 'guest'Y
guestAsHostThe anyone who first joins the room will be the host.booleanN

Response

FieldsDefinitionData TypeMandatory
tokenThe token, which is used to join the room. This token is valid for 30 mins.stringY
hostUrlThe host url of the room.stringN
redirectUrlThe redirect url of the room.stringN
Audio/Video Infrastructure designed for the developers to empower them ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.