Block User
curl --request POST \
--url https://relay.snipp.gg/users/{id}/block \
--header 'relay-key: <api-key>'import requests
url = "https://relay.snipp.gg/users/{id}/block"
headers = {"relay-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'relay-key': '<api-key>'}};
fetch('https://relay.snipp.gg/users/{id}/block', 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://relay.snipp.gg/users/{id}/block",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"relay-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"
"net/http"
"io"
)
func main() {
url := "https://relay.snipp.gg/users/{id}/block"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("relay-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://relay.snipp.gg/users/{id}/block")
.header("relay-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.snipp.gg/users/{id}/block")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["relay-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"blocking": true
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}Social
Block User
Block a user. Also removes any follow between you, both ways.
POST
/
users
/
{id}
/
block
Block User
curl --request POST \
--url https://relay.snipp.gg/users/{id}/block \
--header 'relay-key: <api-key>'import requests
url = "https://relay.snipp.gg/users/{id}/block"
headers = {"relay-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'relay-key': '<api-key>'}};
fetch('https://relay.snipp.gg/users/{id}/block', 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://relay.snipp.gg/users/{id}/block",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"relay-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"
"net/http"
"io"
)
func main() {
url := "https://relay.snipp.gg/users/{id}/block"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("relay-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://relay.snipp.gg/users/{id}/block")
.header("relay-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.snipp.gg/users/{id}/block")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["relay-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"blocking": true
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}Block a user.
Behavior
- The blocked user can no longer see your profile or posts, report you, or like and comment on your posts. Neither of you can follow the other, and Discover and comment lists hide each of you from the other.
- Blocking removes any follow between you, in both directions, and revokes access to private posts either of you had shared with the other.
- Blocking someone you already block succeeds and changes nothing.
- You cannot block yourself.
- Rate limited to 10 blocks per minute.
Examples
curl -X POST "https://relay.snipp.gg/users/987654321098765432/block" \
-H "relay-key: YOUR_RELAY_KEY"
Responses
{
"blocking": true
}
Errors
| Status | Type | When |
|---|---|---|
400 | invalid_request | Invalid id, or yourself |
401 | unauthorized | Missing or invalid key |
403 | suspended | Your account is suspended |
404 | not_found | No such user |
429 | rate_limited | More than 10 blocks per minute |