Time Out Chat User
curl --request POST \
--url https://api.snipp.gg/users/{id}/live/timeouts/{user_id} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"seconds": 600
}'import requests
url = "https://api.snipp.gg/users/{id}/live/timeouts/{user_id}"
payload = { "seconds": 600 }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({seconds: 600})
};
fetch('https://api.snipp.gg/users/{id}/live/timeouts/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snipp.gg/users/{id}/live/timeouts/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'seconds' => 600
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.snipp.gg/users/{id}/live/timeouts/{user_id}"
payload := strings.NewReader("{\n \"seconds\": 600\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.snipp.gg/users/{id}/live/timeouts/{user_id}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"seconds\": 600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snipp.gg/users/{id}/live/timeouts/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"seconds\": 600\n}"
response = http.request(request)
puts response.read_body{
"user_id": "9876543210",
"expires_at": "2026-11-03T08:15:00.000Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}Live
Time Out Chat User
Stop a user from chatting in a stream for a while and remove their messages. Replaces a timeout or ban they already have.
POST
/
users
/
{id}
/
live
/
timeouts
/
{user_id}
Time Out Chat User
curl --request POST \
--url https://api.snipp.gg/users/{id}/live/timeouts/{user_id} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"seconds": 600
}'import requests
url = "https://api.snipp.gg/users/{id}/live/timeouts/{user_id}"
payload = { "seconds": 600 }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({seconds: 600})
};
fetch('https://api.snipp.gg/users/{id}/live/timeouts/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snipp.gg/users/{id}/live/timeouts/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'seconds' => 600
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.snipp.gg/users/{id}/live/timeouts/{user_id}"
payload := strings.NewReader("{\n \"seconds\": 600\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.snipp.gg/users/{id}/live/timeouts/{user_id}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"seconds\": 600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snipp.gg/users/{id}/live/timeouts/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"seconds\": 600\n}"
response = http.request(request)
puts response.read_body{
"user_id": "9876543210",
"expires_at": "2026-11-03T08:15:00.000Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
],
"expires_at": "2023-11-07T05:31:56Z",
"retry_at": "2023-11-07T05:31:56Z",
"missing": [
123
]
}
}Stop a user from chatting in a stream for a while. Their messages in that chat are removed.
Behavior
- Only the streamer, their moderators and staff can time people out; anyone else gets
403with typeforbidden. secondsis60,600,3600or86400.- Timing out the streamer gives
403with typeforbidden, and so does timing out a moderator unless you are the streamer or staff. Timing yourself out is400. - Timing out someone again replaces their current timeout, and timing out someone who is banned replaces the ban.
- Remove the timeout to let them chat again early, or ban them to stop them for good.
- While timed out, sending a message returns
403with typetimed_out.
Example
curl -X POST "https://api.snipp.gg/users/987654321098765432/live/timeouts/123456789012345678" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"seconds": 600}'