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
| Name | Category | Description |
|---|---|---|
workspace | Required | Workspace code |
channel | Required | Channel key. Use the channel value from the list as is |
external_id | Optional | Account to disconnect. Use the external_id value from the list as is. Required if the platform has two or more accounts |
3.3 Request
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
{
"result": "SUCCESS",
"result_code": 0,
"message": "...",
"data": {
"workspace": "a1b2c3d4",
"channel": "youtube",
"external_id": "UC..."
}
}3.5 Field
| Field | Type | Description |
|---|---|---|
workspace | string | Workspace code |
channel | string | Key of the disconnected channel |
external_id | string | Identifier of the disconnected account. Lets you see which account was disconnected when you omitted it in the call |
3.6 Failed
| Code | HTTP | When |
|---|---|---|
9912 | 400 | A required parameter is missing |
1004 | 400 | The platform has two or more accounts but external_id was not provided. Nothing was disconnected |
1001 | 401 | Header is missing or the token is invalid |
2000 | 404 | The workspace doesn't exist, or that account isn't connected |
5000 | 500 | Couldn't disconnect |
