Cabinhub News API v1.0.0

Docs / Delete News Bot

Delete News Bot

Delete News Bot

DELETE/v1/account/news-bot
Auth
cookie session + X-Requested-With: cabinhub-console
Cache-Control
no-store
Source of truth
clients/openapi.json and docs/API.md §12

Parameters

NameInRequiredTypeExampleNotes
X-Requested-Withheadernostring

Example request

curl
Shell
curl -sS -X DELETE \
  'https://vg.tempproject.online/v1/account/news-bot' \
  -H "Cookie: cbn_session=$NEWS_SESSION" \
  -H "X-Requested-With: cabinhub-console"
Python, standard library only
Python
import json
import os
import urllib.request

URL = "https://vg.tempproject.online/v1/account/news-bot"


def call() -> dict:
    req = urllib.request.Request(URL, method="DELETE", headers={
        "Cookie": f"cbn_session={os.environ['NEWS_SESSION']}",
        "X-Requested-With": "cabinhub-console",
    })
    with urllib.request.urlopen(req, timeout=15) as res:
        print(res.status, res.headers.get("Location"))
        text = res.read().decode("utf-8")
        return json.loads(text) if text else {}


if __name__ == "__main__":
    print(call())
TypeScript, Node 18+, no dependencies
TypeScript
const res = await fetch(
  "https://vg.tempproject.online/v1/account/news-bot",
  {
    method: "DELETE",
    headers: {
      cookie: `cbn_session=${process.env.NEWS_SESSION}`,
      "x-requested-with": "cabinhub-console",
    },
  },
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(res.headers.get("etag"), await res.json());

The requests are generated from the path template and the parameters in clients/openapi.json, so a new parameter appears here without an edit to this site.

Example response

Response body
HTTP
cache-control: no-store
content-type: application/octet-stream

No JSON body on this route; the headers are the ones docs/API.md §2 documents for it

Failures

This operation can answer 204, 400, 401, 422. The full envelope for each status, with its body, is on Errors.