API docs

Disconnect a channel

Disconnects a channel. After determining which account to disconnect, it revokes the authorization on the platform side and deletes the authorization data we stored.

Version: v1

03 Disconnect a channel

3.1 Description

DELETE/channels

Disconnecting works on one account at a time. If two or more accounts are connected on the same platform, you must specify which with external_id. Otherwise you get a 400, and nothing is revoked or deleted. If there's only one account, external_id can be omitted.

This cannot be undone. To use it again, you'll need to go through the consent process again on the Channels screen in the app.

3.2 Parameters

Disconnect a channel parameters
NameCategoryDescription
workspaceRequiredWorkspace code
channelRequiredChannel key. Use the channel value from the list as is
external_idOptionalAccount to disconnect. Use the external_id value from the list as is. Required if the platform has two or more accounts

3.3 Request

Terminal — bash
curl -X DELETE https://moacast.com/api/moacast/v1/channels \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"workspace":"a1b2c3d4","channel":"youtube"}'

3.4 Success response

Response — JSON
{
    "result": "SUCCESS",
    "result_code": 0,
    "message": "...",
    "data": {
        "workspace": "a1b2c3d4",
        "channel": "youtube",
        "external_id": "UC..."
    }
}

3.5 Field

Disconnect a channel fields
FieldTypeDescription
workspacestringWorkspace code
channelstringKey of the disconnected channel
external_idstringIdentifier of the disconnected account. Lets you see which account was disconnected when you omitted it in the call

3.6 Failed

Disconnect a channel failures
CodeHTTPWhen
9912400A required parameter is missing
1004400The platform has two or more accounts but external_id was not provided. Nothing was disconnected
1001401Header is missing or the token is invalid
2000404The workspace doesn't exist, or that account isn't connected
5000500Couldn't disconnect

There is no API for creating a new connection. It requires going through the platform's consent screen in a browser, so connecting can only be done on the Channels screen in the app.