Create Token Gated Room 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
https://api.huddle01.com/api/v1/create-room
The Token Gated Room is a feature that allows you to create a room where access is restricted based on the type and value of a token. This means that only those who possess the required token can enter the room By implementing Token Gated Rooms, you can ensure that only the intended participants are granted access to the room, maintaining the privacy and exclusivity of the event.
So, if you're looking for a secure and exclusive way to host your events, try out the Token Gated Room feature and experience the benefits of controlled access.
/createroom
Token Gated Api
The API supports a POST request with the following required parameters:
title
- The title of the room.tokenType
- The type of token to be used for the room. .chain
- The chain the token is on. .contractAddress
- The contract address of the token. .
const response = await axios.post(
'https://api.huddle01.com/api/v1/create-room',
{
"title": "Test Meeting",
"tokenType": "ERC1155",
"chain": "POLYGON",
"contractAddress": ["0xADC327CC02d3230af723C47eCd91a73F600d7E3A"]
},
{
headers: {
'Content-Type': 'application/json',
'x-api-key': {{API_KEY}},
},
}
);
Upon success, the API will return a response with the following fields:
message
- The message returned from the server. .roomId
- The room ID of the newly created room.
In case of an error, the API will return an error message with a corresponding status code.
{
"message": "Meeting Created Successfully",
"data": {
"roomId": "tyt-eyoq-zwq",
}
}
Request
Params | Definition | Data Type | Mandatory |
---|---|---|---|
title | The title of the room. This will be displayed in the room list. | string | Y |
description | The description of the room. This will be displayed in the room list. | string | N |
roomType | AUDIO will be for Audio Spaces and VIDEO will be for normal meetings with Video and Audio both. | AUDIO | VIDEO | N |
startTime | The start time of the room. This will be displayed in the room list. | string (ISO 8601) | N |
expiryTime | The expiry time of the room. This will be displayed in the room list. | string (ISO 8601) | N |
hostWallets | The host wallets how who will have admin access to the room. | string [ ] | N |
roomLocked | The start time of the room. This will be displayed in the room list. | boolean | true |
muteOnEntry | Every new peer who joins, must be muted | boolean | false |
videoOnEntry | Every new peer who joins, must have their video turned off | boolean | false |
Params | Definition | Data Type | Options |
---|---|---|---|
tokenType | Type of token used for the room. | string | ERC20, ERC721, ERC1155, BEP20, BEP721, BEP1155, LENS, POAP, CYBERCONNECT, COSMOS, TEZOS, SPL |
chain | Chain the token is on. | string | ETHEREUM, COSMOS, SOLANA, TEZOS, POLYGON, BSC, ARBITRUM, GOERLI |
contractAddress | Contract address of the token. | string[] | N/A |
conditionType | Type of condition to be used for the room for LENS and CYBERCONNECT | string | COLLECT_POST, FOLLOW_HANDLE, HAVE_HANDLE, MIRROR_POST |
conditionValue | Condition type value for Lens and Cyberconnect,TokenId for ERC 1155 Tokens | string | TokenId for ERC1155, |
NOTE: If using ERC1155
as the token type, you need to pass conditionValue
with the tokenId
.
Response
Fields | Definition | Data Type |
---|---|---|
message | The message returned from the server. | string |
roomId | The id of the room created. | string |