02 Refresh channel info
2.1 Description
POST/channels/sync
Refresh 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 fetched. If there's only one account, external_id can be omitted.
Each data.channel row returned has exactly the same shape as in the channel list.
2.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 fetch info for. Use the external_id value from the list as is. Required if the platform has two or more accounts |
avatar_px | Optional | Size to render the profile picture at (1–1024) |
2.3 Request
curl -X POST https://moacast.com/api/moacast/v1/channels/sync \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{"workspace":"a1b2c3d4","channel":"youtube"}'2.4 Success response
{
"result": "SUCCESS",
"result_code": 0,
"message": "...",
"data": {
"workspace": "a1b2c3d4",
"channel": {
"channel": "youtube",
"external_id": "UC...",
"display_name": "My Channel",
"language": "ko"
}
}
}2.5 Field
| Field | Type | Description |
|---|---|---|
workspace | string | Workspace code |
channel | object | The one updated connection. Fields are the same as a row in the channel list |
2.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 |
1001 | 401 | Header is missing or the token is invalid |
2000 | 404 | The workspace doesn't exist, or that account isn't connected |
4013 | 409 | The channel's authorization has expired or points to a different account. It needs to be reconnected |
4290 | 429 | Already refreshed within the last 60 seconds |
5000 | 502 | Couldn't fetch info from the platform. Stored values are left unchanged |
