Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
89 lines (73 loc) · 2.37 KB

File metadata and controls

89 lines (73 loc) · 2.37 KB

Join Livechat Room

Call this endpoint to join a Livechat room.

{% hint style="info" %} This requires the view-l-room permission. {% endhint %}

HTTP MethodURLRequires Auth
GET/api/v1/livechat/room.joinyes

Query Parameters

KeyExample ValueDescription
roomId*gMMeBpWyLeowCrzBvRoom ID that you want to join.

Example Call

{% 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 %}

Example Response

Success

{
    "success": true
}

Error

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 roomId field is not supplied.
  • Invalid Room: Occurs when the given roomId is 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 %}