Skip to main content

Follow the DJ

Follow this DJ with the bot account. It is the same follow as tapping the follow button in the Spoon app.

For the DJ to set the bot as a favorite manager, the bot account has to be following that DJ first. This API does it without signing in to the app with the bot account.

Method and pathPOST /v1/live/follow
Permissiondj.follow
Success204 (no body)
When not on air404 (OAPI_MNGR_0301)
export SPOON_BASE_URL="https://kr-openapi.spooncast.net"
export SPOON_ACCESS_TOKEN="{your access token}"

For the Japan region use https://jp-openapi.spooncast.net — see regions.

Request​

POST /v1/live/follow

Headers​

NameRequiredDescription
Authorization✔Bearer {access_token}.

There are no path parameters, query parameters, or request body.

The token decides who gets followed — the DJ who consented to that token. The bot cannot follow anyone else.

Request example​

curl -i -X POST "$SPOON_BASE_URL/v1/live/follow" \
-H "Authorization: Bearer $SPOON_ACCESS_TOKEN"

Response​

On success you get a 204 with no body. You also get 204 if the bot already follows the DJ.

HTTP/2 204

Code​

// follow.ts — node --experimental-strip-types follow.ts

interface ApiError {
detailCode: string;
message: string;
}

const res = await fetch(`${process.env.SPOON_BASE_URL}/v1/live/follow`, {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.SPOON_ACCESS_TOKEN}` },
});

if (res.status === 204) {
console.log('Followed. After the broadcast, ask the DJ to set the bot as a favorite manager.');
} else if (res.status === 404) {
console.log('Not on air. Call again once the broadcast starts.');
} else if (res.status === 429) {
console.log('Hit the call quota. Try again shortly.');
} else if (res.status === 401) {
console.error('The integration is disconnected. Ask the DJ to authorize again.');
} else {
// A 403 for a missing permission is blocked in front, so it has no detailCode
const { detailCode, message } = (await res.json()) as Partial<ApiError>;
console.error(`Follow failed ${res.status} ${detailCode ?? 'insufficient scope'}: ${message ?? ''}`);
}
node --experimental-strip-types follow.ts

Watch out​

It only works while the DJ is on air. Otherwise it is a 404 (OAPI_MNGR_0301).

Following alone does not make the bot a manager. The DJ sets the favorite manager in the Spoon app. And a favorite manager cannot be changed while the DJ is on air. Since following only works on air, the order is:

  1. During a broadcast, the bot calls this API and follows the DJ.
  2. After the broadcast ends, the DJ sets the bot account as a favorite manager in the Spoon app.
  3. In the next broadcast the bot connects at manager level, and presence events arrive.

Once is enough. It returns 204 even if the bot already follows the DJ, so there is no need to call it every broadcast.

The follow shows up in the broadcast. Just like following in the Spoon app, a follow message appears in the DJ's and managers' chat, and it counts toward this broadcast's new fans.

There is no unfollow API. To unfollow, sign in to the Spoon app with the bot account and do it there.

Errors​

HTTPdetailCodeWhat happenedWhat to do
401noneThe token is missing or invalid.Ask the DJ to authorize again.
403noneThe dj.follow permission is missing.Add the permission and get consent again.
403OAPI_MNGR_0211The bot account cannot follow this DJ. The DJ may have blocked the bot.Retrying does not help. The DJ has to lift it.
404OAPI_MNGR_0301The DJ is not on air.Call again after the broadcast starts.
502OAPI_MNGR_2302Broadcast server error.Retry after a backoff.

States outside this table can arrive too. A wrong method (405 — OAPI_MNGR_0103), the call quota (429, no body), and server errors (500 — OAPI_MNGR_1002) are common to every endpoint — see Error codes.