-
-
Notifications
You must be signed in to change notification settings - Fork 103
API Documentation
- Overview
-
Endpoints
- /status
GET
- Effects
- Custom Variables
- Currency
- /status
Firebot hosts a local API that developers can use to get data from Firebot or tell it to run effects.
- The API is hosted on port 7472. All endpoints have the root http://localhost:7472/api/v1
- All responses are in JSON.
- Don't forget that Firebot must be running for the API to be available.
Get the connection status of Twitch Chat
None
None
{
"connections": {
"chat": true
}
}
Get a list of Firebot effects
None
- trigger=[triggerType] - Filter to effects that support the given trigger
- dependency=[dependencyType] - Filter to effects that require the given dependency
- onlynames=true - Return an array of effect names instead of the full effect objects
Note: Example only contains one effect in the list to keep it short. Actual response has a longer list.
[
{
"id": "firebot:chat",
"name": "Chat",
"description": "Send a chat message.",
"icon": "fad fa-comment-lines",
"categories": [
"common",
"chat based"
],
"dependencies": [
"chat"
],
"triggers": {
"command": true,
"custom_script": true,
"api": true,
"event": true,
"hotkey": true,
"timer": true,
"counter": true,
"preset": true,
"manual": true
}
},
]
Run a list of effects
None
None
{
"effects": {
"queue": null,
"list": [
{
"type": "firebot:chat",
"chatter": "Streamer",
"message": "Test chat message"
}
]
},
"triggerData": {
"username": "ebiggz"
}
}
- effects.list - A list of effects that you want Firebot to run.
- effects.queue - Optional (string | null) The id of the effect queue that these effects should be placed in
- triggerData - Optional An object containing trigger data used for certain effects (such as Chat)
{
"status": "success"
}
Get info on a particular effect.
- effect - Either the effect name or id.
None
{
"id": "firebot:chat",
"name": "Chat",
"description": "Send a chat message.",
"icon": "fad fa-comment-lines",
"categories": [
"common",
"chat based"
],
"dependencies": [
"chat"
],
"triggers": {
"command": true,
"custom_script": true,
"api": true,
"event": true,
"hotkey": true,
"timer": true,
"counter": true,
"preset": true,
"manual": true
}
},
Get the accepted triggers for an effect
- effect - Either the effect name or id.
None
[
"chat",
"custom_script",
"api"
]
Get the dependencies for an effect
- effect - Either the effect name or id.
None
[
"chat"
]
Run a preset effect list
- presetListId - The id of the preset effect list
None
{
"args": {
"argName1": "argValue1",
"argName2": "argValue2"
}
}
{
"status": "success"
}
Returns an object of objects containing the ttl and value of all custom variables.
None
None
{
"variableName": {
"t": 0,
"v": "custom variable value"
}
}
Returns an object with the ttl and the value of the given custom variable, or creates/updates a custom variable by name.
- variableName - The name of the custom variable
None
{
"ttl": 0,
"data": "custom variable value"
}
{
"t": 0,
"v": "custom variable value"
}
Returns an object of currency configs.
None
None
{
"b9e4b340-6e43-11ec-9034-855cfccea1fc": {
"id": "b9e4b340-6e43-11ec-9034-855cfccea1fc",
"name": "Points",
"active": true,
"payout": 5,
"interval": 5,
"limit": 0,
"transfer": "Allow",
"bonus": {},
"$$hashKey": "object:12345"
}
}
Returns a currency config for the given currency name.
- currencyName - The name of the currency
None
{
"id": "b9e4b340-6e43-11ec-9034-855cfccea1fc",
"name": "Points",
"active": true,
"payout": 5,
"interval": 5,
"limit": 0,
"transfer": "Allow",
"bonus": {}
}
Returns key value pairs for all currency values a user has, where the key is the currency id and value is the amount.
None
-
username (optional) - Set to
true
to make Firebot tread:userId
as a username instead.
{
"1d563320-47a0-11eb-bf90-3ff408e1e682": 0,
"b9e4b340-6e43-11ec-9034-855cfccea1fc": 0
}
Returns the currency amount for the given currency id or updates the currency for the user with the given amount.
None
-
username (optional) - Set to
true
to make Firebot tread:userId
as a username instead.
setAmount
is optional (true by default), and will override the user's currency with the supplied value instead of trying to add it.
{
"amount": 5,
"setAmount": true
0
Still need help? Come chat with us in the #help channel of our Discord server.