Docs / Request Code
Request Code
Request Code
POST/v1/account/otp
- Auth
- X-Requested-With: cabinhub-console (no session)
- Cache-Control
no-store- Source of truth
clients/openapi.jsonanddocs/API.md§12
202on every path: a known address, an unknown one and an address whose send failed all answer this body. The work and the status are identical, so the route cannot be used to test whether an address has an account.- The body is
{"email": "<address>"}. The headerX-Requested-With: cabinhub-consoleis required; a missing or wrong value is400 X-Requested-With must be cabinhub-console. - A malformed address is
400 email must be a single valid address; the rate limits answer429withRetry-After, before the lookup. - The code is six CSPRNG digits, stored only as a peppered HMAC, valid for 10 minutes, single use, five tries.
Description: docs/API.md §12
Parameters
| Name | In | Required | Type | Example | Notes |
|---|---|---|---|---|---|
X-Requested-With | header | no | string | ||
Accept-Language | header | no | string |
Example request
curl -sS -X POST \
'https://vg.tempproject.online/v1/account/otp' \
-H "X-Requested-With: cabinhub-console" \
-H "Content-Type: application/json" \
-d '{"email": "desk@vg-broker.example"}'import json
import os
import urllib.request
URL = "https://vg.tempproject.online/v1/account/otp"
def call() -> dict:
req = urllib.request.Request(URL, method="POST", headers={
"X-Requested-With": "cabinhub-console",
"Content-Type": "application/json",
}, data=json.dumps({"email": "desk@vg-broker.example"}).encode("utf-8"))
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())const res = await fetch(
"https://vg.tempproject.online/v1/account/otp",
{
method: "POST",
headers: {
"x-requested-with": "cabinhub-console",
"content-type": "application/json",
},
body: JSON.stringify({"email": "desk@vg-broker.example"}),
},
);
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
{"status": "sent"}Response example in docs/API.md §12 (POST /v1/account/otp)
Failures
This operation can answer 202, 400, 422, 429. The full envelope for each status, with its body, is on Errors.