Skip to content
twitch.apiv2.0

Reference / API groups

twitch.goals

Creator goals of a channel.

Every method of twitch.goals, with its parameters, what it returns and the token it needs.

twitch.goals.get(params?, options?): Promise<CreatorGoal[]>

Lists the active goals of a broadcaster with their current progress.

Token: user, scope channel:read:goals.

NameTypeDescription
broadcaster_idstringBroadcaster who created the goals. Defaults to the user making the call.

options: Request options for this call: as, token, signal, timeout, retries.

Promise<CreatorGoal[]>

Fields of CreatorGoal
NameTypeDescription
idstringID of the goal.
broadcaster_idstringID of the broadcaster who created the goal.
broadcaster_namestringDisplay name of the broadcaster.
broadcaster_loginstringLogin name of the broadcaster.
typeCreatorGoalTypeWhat the goal counts.
descriptionstringText of the goal. An empty string when the broadcaster wrote none.
current_amountnumberWhere the count stands now. For follower this is the whole follower count of the channel.
target_amountnumberValue the broadcaster wants to reach.
created_atstringWhen the goal was created, as an RFC 3339 timestamp.
const goals = await twitch.goals.get();
for (const goal of goals) console.log(goal.type, goal.current_amount, goal.target_amount);

Twitch reference