DoAction
Trigger an action in Streamer.bot via HTTP
Request
/DoAction
POST
Request body
application/json
// Content-Type: application/json
{
"action": {
"id": "<guid>",
"name": "<name>"
},
"args": {
"key": "value"
}
}
// Execute action by ID
{
"action": { "id": "4af4bdef-f396-521f-a1a5-02983ae638cb"}
}
// Execute action by name
{
"action": { "name": "My Action" }
}
Parameters
action
object required
The Streamer.bot action to trigger, identified by its GUID or name.
args
Dictionary<string, object>
Optional arguments to pass to the action as key-value pairs.
Response
204 No Content
Example
curl -X POST http://127.0.0.1:7474/DoAction \
-H "Content-Type: application/json" \
-d '{
"action": {
"id": "your-action-guid",
"name": "Your Action Name"
},
"args": {
"customArg": "customValue"
}
}'
const response = await fetch('http://127.0.0.1:7474/DoAction', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: {
id: 'your-action-guid',
name: 'Your Action Name'
},
args: {
customArg: 'customValue'
}
})
});
console.log(response.status); // 204
import requests
import json
data = {
"action": {
"id": "your-action-guid",
"name": "Your Action Name"
},
"args": {
"customArg": "customValue"
}
}
response = requests.post(
'http://127.0.0.1:7474/DoAction',
headers={'Content-Type': 'application/json'},
data=json.dumps(data)
)
print(response.status_code) # 204