Counter Dashboard

API Reference

Parameters

ParamDescriptionRequired
chanChannel name*
userUsername — @ prefix stripped automaticallyYes
idCounter name, e.g. deathsYes
modeOperation mode (see Modes)No
numInteger value for set modeNo

* chan is optional when called from Nightbot — the channel is read automatically from the Nightbot-Channel request header.

Modes

mode=ActionReturns
(omit)Increment by 1New count
queryRead current valueCurrent count
resetSet to 0Count Reset
setSet to numCount set to N
overlayOBS browser sourceHTML page

Nightbot Examples

Increment (e.g. death counter):

$(urlfetch /api?user=$(user)&id=deaths)

Query current count:

$(urlfetch /api?user=$(user)&id=deaths&mode=query)

Reset counter:

$(urlfetch /api?user=$(user)&id=deaths&mode=reset)

chan is not needed — Nightbot sends it automatically.

Direct URL Examples

Increment:

/api?chan=mychan&user=myuser&id=deaths

Set to a specific value:

/api?chan=mychan&user=myuser&id=deaths&mode=set&num=10

OBS overlay source URL:

/api?chan=mychan&user=myuser&id=deaths&mode=overlay