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

Latest commit

 

History

History
63 lines (47 loc) · 1.71 KB

File metadata and controls

63 lines (47 loc) · 1.71 KB

Close Channel

Removes the channel from the user's list of channels.

HTTP MethodURLRequires Auth
POST/api/v1/channels.closeyes

Body Parameters

KeyExample ValueDescription
roomId*ByehQjC44FwMeiLbXThe channel ID that you want to close from your list.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type: application/json" \
     https://localhost:3000/api/v1/channels.close \
     -d '{ 
          "roomId": "ByehQjC44FwMeiLbX" }'

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.
  • Channel is already closed: This occurs when the channel is already closed to the authenticated user.

{% tabs %} {% tab title="Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="User is already an owner" %}

{
    "success": false,
    "error": "The channel, dlp, is already closed to the sender"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
0.48.0 Added