Removes the channel from the user's list of channels.
HTTP Method | URL | Requires Auth |
---|---|---|
POST | /api/v1/channels.close | yes |
Key | Example Value | Description |
---|---|---|
roomId * | ByehQjC44FwMeiLbX | The channel ID that you want to close from your list. |
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" }'
{
"success": true
}
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 %}
Version | Description |
---|---|
0.48.0 | Added |