API Reference & Interactive Test Page
Extension ID from Chrome Web Store (pre-filled)
All communication via chrome.runtime.sendMessage(EXTENSION_ID, message, callback). Your site must be listed in the extension's externally_connectable (platform.notpeople.ai or localhost).
platform.notpeople.ai or localhost). chrome.runtime will be undefined otherwise.Returns current Twitter session info. Account is auto-detected from browser cookies — no manual authorization needed.
Returns Twitter session cookies (auth_token, ct0, twid) for the current browser session.
Every action (post, reply, quote) follows the same flow:
callbackUrl — the result will be POSTed there when the tweet is created. No hardcoded callback server.Create a new tweet.
| Param | Type | Description |
|---|---|---|
text | string | required Tweet text |
userId | string | optional Expected userId — returns account_mismatch if wrong account is logged in |
imageUrls | string[] | optional Image URLs (max 4) |
callbackUrl | string | optional URL to POST result to |
callbackData | object | optional Extra data included in callback |
Reply to an existing tweet.
| Param | Type | Description |
|---|---|---|
tweetId | string | required ID of tweet to reply to |
text | string | required Reply text |
userId | string | optional Expected userId — verifies correct account |
imageUrls | string[] | optional Image URLs (max 4) |
callbackUrl | string | optional URL to POST result to |
callbackData | object | optional Extra data included in callback |
Quote tweet.
| Param | Type | Description |
|---|---|---|
tweetId | string | required ID of tweet to quote |
text | string | required Quote comment text |
userId | string | optional Expected userId — verifies correct account |
imageUrls | string[] | optional Image URLs (max 4) |
callbackUrl | string | optional URL to POST result to |
callbackData | object | optional Extra data included in callback |
Swap Twitter session cookies to switch accounts. Closes all Twitter tabs, sets new cookies, verifies session.
Swap to account, post, swap back. Fully automated.
After calling do_post / do_reply / do_quote, you get a taskId back instantly. Use wait_result to wait for the actual result.
| Param | Type | Description |
|---|---|---|
taskId | string | required taskId from action response |
timeout | number | optional Max wait ms (default: 60000) |
Pass callbackUrl with any action request. The extension POSTs the result there when the tweet is created. Each request can use a different URL.
| Error | Meaning | What to do |
|---|---|---|
not_logged_in | No Twitter session in browser | Log in to x.com |
no_session | No active cookies | Log in to x.com |
no_cookies | get_tokens found no cookies | Log in to x.com |
account_mismatch | Browser logged into different account than expected userId | Swap cookies to correct account first |
timeout | wait_result timed out | Tweet may still post — check callback |
session_failed | Cookie swap could not establish session | Check cookie values |