Call this endpoint to join a Livechat room.
{% hint style="info" %}
This requires the view-l-room permission.
{% endhint %}
| HTTP Method | URL | Requires Auth |
|---|---|---|
GET | /api/v1/livechat/room.join | yes |
| Key | Example Value | Description |
|---|---|---|
roomId* | gMMeBpWyLeowCrzBv | Room ID that you want to join. |
{% code overflow="wrap" %}
curl --location --request GET 'http://localhost:3000/api/v1/livechat/room.join?roomId=gMMeBpWyLeowCrzBv' \
--header 'Content-type: application/json' \
--header 'X-Auth-Token: OsLBoPh6cUgNuh6mWT8z4VIY_nGl8R30XVE4QNDLT6S' \
--header 'X-User-Id: f5vPj6jfkRXipkwoC' \
--data-raw ''{% endcode %}
{
"success": true
}Any of the following errors can occur on the endpoint.
- Authorization: Requires an authentication token for the request to be made.
- Missing key: This error is thrown when the
roomIdfield is not supplied. - Invalid Room: Occurs when the given
roomIdis invalid. - Not allowed: Occurs when the authenticated user doesn't have permission to access the room.
{% tabs %} {% tab title=" Authorization" %}
{
"status": "error",
"message": "You must be logged in to do this."
}{% endtab %}
{% tab title="Missing Key" %}
{
"message": "Match error: Missing key 'roomId'",
"path": "",
"sanitizedError": {
"isClientSafe": true,
"error": 400,
"reason": "Match failed",
"message": "Match failed [400]",
"errorType": "Meteor.Error"
},
"errorType": "Match.Error",
"success": false
}n{% endtab %}
{% tab title="Invalid Room ID" %}
{
"isClientSafe": true,
"error": "error-invalid-room",
"reason": "Invalid room",
"details": {
"method": "joinRoom"
},
"message": "Invalid room [error-invalid-room]",
"errorType": "Meteor.Error",
"success": false
}{% endtab %} {% endtabs %}