API pipeline: Take over an account a Cabi.Chat oracle set up for you

Goal: after a Cabi.Chat oracle set up your project page from a Telegram chat, take it over: review and edit the page, see the oracle's setup access and revoke it.

What happens in the chat

Steps

1. Sign in with the same Telegram account that talked to the oracle: API pipeline: Sign in to Cabi.Chat with Telegram. Check: GET /v0/my/self.

2. Find the page. GET /v0/my/projects → {"projects": [{"nonce": "<project>", "title": "…", "visibility": "Public", …}], "total": 1}.

3. Review and edit.

PATCH /v0/my/projects/<project>
{"title": "…", "content": "…", "visibility": "Unlisted"}
→ the project

4. See the setup access. GET /v0/my/pats → a row {"title": "<oracle> — setup access", "last_used_at": "…", "revoked": false}.

5. Revoke it. POST /v0/my/pats/<pat>/revoke → "revoked": true. The oracle loses access to your account at once. You can also ask the oracle in the chat to give it up.

Rules

API surface

Endpoint Purpose FE AI / oracle
GET /v0/my/self Which account you are in yes yes
GET /v0/my/projects, PATCH /v0/my/projects/{nonce} Your page: read, edit yes yes
GET /v0/my/pats See the setup access yes no
POST /v0/my/pats/{nonce}/revoke Revoke it yes no

Index: API pipelines — index

Mentioned