Setup
Channels — where the shop posts for you
Every venue the studio can post to, the exact credential each one needs, and the paste that is proved against the venue's own API before it is saved. Nothing on this page creates an account or asks for a password.
Read from this machine when the page was built
A channel is ready when its credential file carries every key its adapter reads. The badge also says whether the credential was ever proved against the platform — a file on disk is not the same as a working token, and this page does not pretend otherwise.
| Channel | Status | Why | Verified |
|---|---|---|---|
| X (Twitter) | ready | file present | demiurge500 |
| LinkedIn (member profile) | not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no linkedin.json in this account's folder | — |
| Facebook Page | not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no meta.json in this account's folder | — |
| Instagram (Business/Creator) | not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no meta.json in this account's folder | — |
| not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no pinterest.json in this account's folder | — | |
| not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no reddit.json in this account's folder | — | |
| TikTok | not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no tiktok.json in this account's folder | — |
| Mastodon (any server) | not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no <host>.token in this account's folder | — |
| Bluesky | ready | file present | demiurge500.bsky.social |
| Discord | not ready | not connected for account acct_1Ufe9MFa4uy7vmVo — no discord.json in this account's folder | — |
Refresh it by rebuilding the site, or run
.venv-v2/bin/python -m v2.channels.setup --state for the same table in a terminal. The desktop
app shows it live, with the paste box.
Every channel, in the order one is worth doing
Open one. The steps are the click path a person takes; the table under it is the key names
this code actually reads, taken from the adapter that reads them. A key that does not verify is never
written — --save proves it first and refuses a bad paste.
X (Twitter) ready verified as @demiurge500
One announcement per product on your own X account, through POST /2/tweets.
| What it needs | x.json in ~/.config/agent-arena/
or the env var X_JSON |
|---|---|
| Console | https://console.x.com/ |
| App type | OAuth 2.0 “Type of app”: Web app, automated app or bot (confidential client) — picked in the app's Settings tab, not while creating the app. |
| Scopes | tweet.write, users.read, offline.access |
| Now | file present · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/x.json
· mode 600 |
The click path
- console.x.com → sign in as the account that will post
- Apps → Create app — give a name, description and use case (the console has no Projects section and no Create Project step any more)
- app → Settings tab → App permissions: Read and write (same form also holds Type of app, Callback URI and Website URL, both required)
- Keys & Tokens tab → read Consumer Key / Consumer Key secret / Access Token / Access Token Secret
- Buy credits (Credits → Buy credits): posting is pay-per-usage — Post: Create is $0.015 per request, and $0.200 per request when the post contains a URL
- If the access token was made while permissions were Read, press Regenerate
- Before the first post: connect the app to a plan — the Apps page says “An app is a set of keys. Connect it to plans to choose what those keys can call.”, and an app never attached to Pay Per Use cannot post, credits or not
- Local callback URLs use the loopback IP — http://127.0.0.1, never localhost — matched exactly including the trailing slash, at most 10 per app
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
api_key | Consumer Key | required | Keys & Tokens tab → “OAuth 1.0a keys” → Consumer Key (the secret is shown beside it when generated) |
api_secret | Consumer Key secret | required | Keys & Tokens tab → “OAuth 1.0a keys” → Consumer Key secret (shown beside the key when it is generated) |
access_token | Access Token | required | Keys & Tokens tab → “OAuth 1.0a keys” → Access Token (Generate / Regenerate; the row names the account and shows its Read/Write badge) |
access_secret | Access Token Secret | required | Keys & Tokens tab → “OAuth 1.0a keys” → Access Token Secret (shown when the token is generated) |
bearer | …or one OAuth 2.0 user token | optional | OAuth 2.0 authorization-code flow; replaces the four keys above |
Paste it — proved before it is saved
printf '%s' '{"api_key": "", "api_secret": "", "access_token": "", "access_secret": ""}' | .venv-v2/bin/python -m v2.channels.setup --save x
OAuth 1.0a keys are the right choice for a daemon: they do not expire on a clock. A post carrying a URL is $0.200 against $0.015 text-only, so budget per post, not per call. OAuth 2.0 user tokens last two hours unless offline.access was requested. A token minted before the app was switched to Read and write keeps the old scope until it is generated again. Quote-posting (quote_tweet_id) is Enterprise-only: it is not available on self-serve pay-per-use tiers. Docs: https://docs.x.com/x-api/posts/create-post
LinkedIn (member profile) not ready
One post per product on your own member profile, through POST /rest/posts (headers: Linkedin-Version: YYYYMM and X-Restli-Protocol-Version: 2.0.0).
| What it needs | linkedin.json in ~/.config/agent-arena/
or the env var LINKEDIN_JSON |
|---|---|
| Console | https://www.linkedin.com/developers/apps/new |
| App type | LinkedIn app associated with a LinkedIn Page; Products tab: “Share on LinkedIn” (grants w_member_social) + “Sign in with LinkedIn using OpenID Connect” (grants openid, profile) |
| Scopes | w_member_social, openid, profile |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no linkedin.json in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/linkedin.json
|
The click path
- Create app form → App name, LinkedIn Page, Privacy policy URL, App logo, tick the API Terms of Use (no Website URL field is asked for)
- Privacy policy URL: https://demiurge.deals/privacy/ — required on the Create app form; the app cannot be saved without it
- App logo: a square image, at least one dimension ≥100px (deploy/public/icon-512.png works)
- linkedin.com/developers/apps/new → name it, pick the Page, Create app
- Skip app verification for these two products: “Share on LinkedIn” and “Sign in with LinkedIn using OpenID Connect” are Open Permissions — self-serve, no review, no Page verification
- Products tab → add “Share on LinkedIn” and “Sign in with LinkedIn using OpenID Connect” (both are added, not requested — no approval step)
- Auth tab → “Authorized redirect URLs for your app” → add http://127.0.0.1:8080/callback (loopback IP, not the hostname localhost)
- Open the /oauth/v2/authorization URL with scope w_member_social openid profile, copy ?code= from the redirect
- Exchange the code at POST /oauth/v2/accessToken → access_token; read `sub` at GET /v2/userinfo
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
access_token | OAuth 2.0 access token | required | POST /oauth/v2/accessToken after the authorization-code redirect |
author_urn | author_urn | required | “urn:li:person:” + the `sub` field from GET https://api.linkedin.com/v2/userinfo |
version | Linkedin-Version (YYYYMM, e.g. 202611) | optional | the header is mandatory on every /rest/posts call; the adapter sends 202611 when the file has none, so set this only to pin a newer release |
api | api=ugc (optional) | optional | only for accounts pinned to the legacy /v2/ugcPosts endpoint |
refresh_token | …or a refresh token (stored, not yet refreshed by the adapter) | optional | returned by POST https://www.linkedin.com/oauth/v2/accessToken beside the access token that lasts 60 days |
Paste it — proved before it is saved
printf '%s' '{"access_token": "", "author_urn": ""}' | .venv-v2/bin/python -m v2.channels.setup --save linkedin
A token issued without w_member_social is present but refused at post time (403) — re-run the authorization after adding the product. Access tokens are issued with a 60-day lifespan, and the token exchange also returns refresh_token and refresh_token_expires_in: the file can keep the refresh token, but this adapter has no refresh call, so day 61 is a re-authorization. The Posts API does not build link previews — set the article fields (thumbnail, title, description) yourself, because a bare product URL will not render as a card. Linkedin-Version 202601 sunsets on 2027-01-15, so pin a release the docs still list. Loopback redirects are a PKCE flow LinkedIn has to switch on for the app (ask your point of contact); a plain web-app redirect has to be HTTPS. Docs: https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api
Facebook Page not ready
One feed post per product on your own Page, through POST /{page_id}/feed.
| What it needs | meta.json in ~/.config/agent-arena/
or the env var META_JSON |
|---|---|
| Console | https://developers.facebook.com/apps/ |
| App type | Business app: Create App → App details (name + contact email) → Use cases → Business (portfolio) step → Go to dashboard; permissions come from the use case “Manage everything on your Page” (required business_management, pages_show_list) plus the optional pages_manage_posts and pages_read_engagement |
| Scopes | pages_show_list, pages_read_engagement, pages_manage_posts, business_management |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no meta.json in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/meta.json
|
The click path
- developers.facebook.com/apps/creation/ → app name + contact email → Use cases: “Manage everything on your Page” (pick “Other” only for the Business/Consumer type flow) → Business: connect an existing portfolio or “I don't want to connect a business portfolio yet” → Go to dashboard
- App dashboard → Use cases → Customize → add the optional pages_manage_posts and pages_read_engagement permissions (Products → Add Product still exists for an Other/Business-type app)
- tools/explorer → select the app → permissions: pages_show_list, pages_read_engagement, pages_manage_posts, business_management
- Generate Access Token → GET /me/accounts?fields=id,name,access_token → take the Page id + token
- Exchange the user token for a long-lived one at /oauth/access_token?grant_type=fb_exchange_token, then re-read /me/accounts
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
page_id | Page id | required | GET /me/accounts?fields=id,name,access_token → the Page's `id` |
access_token | long-lived Page access token | required | the Page's `access_token` from /me/accounts, read after exchanging the user token at GET /oauth/access_token?grant_type=fb_exchange_token&client_id=…&client_secret=…&fb_exchange_token=… |
ig_user_id | Instagram business account id | optional | GET /{page_id}?fields=instagram_business_account — needed for the instagram channel |
Paste it — proved before it is saved
printf '%s' '{"page_id": "", "access_token": ""}' | .venv-v2/bin/python -m v2.channels.setup --save facebook
page_id and ig_user_id are not secrets; the file holds the token, so it stays 0600. The Page token is the trap: POST /{page-id}/feed needs a Page access token requested by someone who can perform CREATE_CONTENT plus pages_manage_posts — a user token, even one holding the permission, cannot publish as the Page. The Graph API moved to v27.0 on 2026-11-04; v21.0 is retired on 2027-01-21 (v20.0 went on 2026-09-24), so the version in verify.url moves with it. Page Publishing Authorization blocks publishing until a person completes it in the interface — no credential works around it. App Review is not needed while only people with a role on the app post, but Advanced Access (App Review plus Business Verification) is required the moment anyone else's Page is involved. The “Manage everything on your Page” use case grants no Instagram permission: the Instagram half of meta.json needs its own use case or permissions. The console URL is the app list once a developer session exists; without one it redirects to the marketing page, so it could not be re-read in this pass. Docs: https://developers.facebook.com/docs/graph-api/reference/page/feed/
Instagram (Business/Creator) not ready
One image post per product, two-step: POST /{ig_user_id}/media then /media_publish on graph.facebook.com.
| What it needs | meta.json in ~/.config/agent-arena/
or the env var META_JSON |
|---|---|
| Console | https://developers.facebook.com/apps/ |
| App type | same Meta app as the Page; the “Instagram API with Facebook Login” setup — in the App Dashboard add the Facebook Login for Business product, then request instagram_basic, instagram_content_publish, pages_show_list and pages_read_engagement |
| Scopes | instagram_basic, instagram_content_publish, pages_show_list, pages_read_engagement |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no meta.json in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/meta.json
|
The click path
- Instagram app → Settings → Account type and tools → switch to Professional (Business or Creator)
- Link the Facebook Page to the Instagram professional account (the API cannot reach consumer accounts; for this Page-linked setup the Page connection is required)
- In the App Dashboard, add the Facebook Login for Business product (leave its settings on their defaults; enter the redirect URI under “Valid OAuth redirect URIs” only if you are not using an SDK)
- GET /{page_id}?fields=instagram_business_account with the Page token → the id
- Permissions: instagram_basic, instagram_content_publish, pages_show_list and pages_read_engagement — pages_read_engagement is required by the publishing permission table and is the likeliest reason a first post fails
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
ig_user_id | Instagram business account id | required | GET /{page_id}?fields=instagram_business_account → instagram_business_account.id |
access_token | long-lived Page access token | required | same token as the facebook channel (one file serves both) |
Paste it — proved before it is saved
printf '%s' '{"ig_user_id": "", "access_token": ""}' | .venv-v2/bin/python -m v2.channels.setup --save instagram
An image is mandatory: the product must ship deploy/public/p/<slug>/hero.jpg, because Instagram fetches the URL itself. It must be JPEG — the only supported format, MPO and JPS included — and on a public server at the moment of the attempt. Publishing is capped at 100 API-published posts per 24-hour moving period, a carousel counting as one, enforced on /media_publish. Page Publishing Authorization blocks publishing: a professional account connected to a Page that requires PPA cannot be published to until PPA is completed. Meta now recommends “Instagram API with Unified Login” for new integrations and it needs no Facebook Page; “Instagram API with Instagram Login” also works Page-less with the instagram_business_basic / instagram_business_content_publish family on graph.instagram.com — the steps below describe the Page-linked variant. Standard Access covers accounts you own; Advanced Access needs App Review and Business Verification and is only for accounts you do not manage. The Professional-account menu path in step 1 comes from Instagram's own help centre, not Meta's developer docs, and was not re-read in this pass. Docs: https://developers.facebook.com/docs/instagram-platform/content-publishing
Pinterest not ready
One Pin per product on a board you own, through POST /v5/pins.
| What it needs | pinterest.json in ~/.config/agent-arena/
or the env var PINTEREST_JSON |
|---|---|
| Console | https://developers.pinterest.com/apps/ |
| App type | Pinterest API app administered by a Pinterest business account — approved for Trial access on creation; Standard access is a separate upgrade request |
| Scopes | pins:write, boards:read |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no pinterest.json in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/pinterest.json
|
The click path
- Create a business account and one board by hand (e.g. “Demiurge — things we made”)
- developers.pinterest.com/apps → “Connect app” → complete the request form (app name ≥3 Latin letters/numbers and no “Pinterest”, description, redirect URI, privacy policy) → submit for Trial access; scopes are requested at OAuth authorization time, not on the app
- Submit the app for Trial access and wait for Pinterest's email; for public Pins request Standard access (My apps → Upgrade → verify app details, add the privacy policy link, upload a video of the OAuth flow) and wait for that review
- Generate a token on the Configure tab — a Trial “product limited token” expires after 24 hours, so a durable one comes from the OAuth authorization-code exchange at POST /v5/oauth/token
- GET https://api.pinterest.com/v5/boards with the token → copy items[].id for the board you own (apps registered on or after 2026-09-14 get 403 PINNER_DATA_ACCESS_DENIED on board and Pin reads unless the token is the business account that owns them)
- Apps registered on or after 2026-09-14 hit 403 PINNER_DATA_ACCESS_DENIED on Get board, List Pins and Get Pin — “Your application does not have access to read pinner data.” Only reads of the boards and Pins belonging to the business account that authorized the app are exempt, so authorize as the account that owns the board
- A Pin needs media: media_source.image_url, which Pinterest fetches itself — a product with no hero.jpg is skipped, so check that file before expecting a Pin
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
access_token | access token | required | My apps → Manage → Configure tab → “Api keys” (App secret key); a Trial “product limited token” can be generated there and expires after 24 hours — a durable token comes from the OAuth authorization-code exchange at POST /v5/oauth/token |
board_id | board id | required | GET https://api.pinterest.com/v5/boards → items[].id, for the board you own |
refresh_token | …or a refresh token (stored, not yet refreshed by the adapter) | optional | returned by POST https://api.pinterest.com/v5/oauth/token; the app-issued Trial token expires after 24 hours |
Paste it — proved before it is saved
printf '%s' '{"access_token": "", "board_id": ""}' | .venv-v2/bin/python -m v2.channels.setup --save pinterest
Pinterest needs an image (media_source.image_url) and fetches it itself; a product with no hero.jpg is skipped, never posted as a bare link. Trial-access Pins and Boards are sandbox entities, visible only to their creator, so a successful POST /v5/pins proves nothing about what the public sees until Standard access is approved. Standard access needs a video recording of the OAuth flow even when the owner is the only user, plus a privacy policy link on the app. The app secret is not visible while the app is pending review — “if your app is pending Pinterest approval, you cannot see your app secret” — so the OAuth exchange cannot start before the Trial email arrives. The UI token dies after 24 hours and the file's refresh_token is stored but never refreshed, so a durable setup is an OAuth exchange the adapter does not perform. Docs: https://developers.pinterest.com/docs/api/v5/pins-create/
Reddit not ready
One link post per product into one subreddit you picked, through POST https://oauth.reddit.com/api/submit with kind=link.
| What it needs | reddit.json in ~/.config/agent-arena/
or the env var REDDIT_JSON |
|---|---|
| Console | https://www.reddit.com/prefs/apps |
| App type | script app (client id + secret; the redirect uri field is only read by the code flow — http://localhost:8080 is fine) |
| Scopes | submit, identity |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no reddit.json in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/reddit.json
|
The click path
- Request Data API access from Reddit first (support.reddithelp.com → contact form, ticket_form_id=14868593862164), then reddit.com/prefs/apps → create an app → type script → redirect uri http://localhost:8080
- Copy client_id (under the app name) and secret
- Pick the one subreddit whose rules allow self-promotion and read those rules first
- Save client_id, client_secret, username, password, subreddit — or a refresh_token instead of the password
- A descriptive User-Agent is part of the setup, not a nicety: “<platform>:<app ID>:<version string> (by /u/<reddit username>)” — the adapter builds it from the username
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
client_id | client id | required | the short string under the app name on the prefs/apps page |
client_secret | client secret | required | the field labelled “secret” |
username | reddit username | optional | without u/ — needed for the password grant |
password | reddit password | optional | the account password — grant_type=password is documented for script apps only; on an account with 2FA prefer the refresh token, because Reddit asks for the 6-digit code as part of an OAuth sign-in |
refresh_token | …or a refresh token | optional | the code→token exchange with duration=permanent (all bearer tokens expire after 1 hour, so a daemon needs this); this is also the route that survives 2FA |
subreddit | the one subreddit | required | without r/ — pick a community whose rules allow a maker to share their own work |
Paste it — proved before it is saved
printf '%s' '{"client_id": "", "client_secret": "", "subreddit": ""}' | .venv-v2/bin/python -m v2.channels.setup --save reddit
One post per subreddit per 24 h, enforced in the adapter and again at the gate, on top of Reddit's own limits (100 queries per minute per OAuth client id for free access). This is the only file in the folder that can hold an account password. Access tokens last one hour and every run refreshes, so never store an access token — this file holds the refresh token or the password. Commercial use needs Reddit's written permission: “You cannot use any Reddit developer tools and services for commercial purposes without first getting our permission.”, and a shop is commercial use. A descriptive User-Agent is mandatory in the form “<platform>:<app ID>:<version string> (by /u/<reddit username>)” — generic agents are throttled or blocked. Docs: https://www.reddit.com/dev/api/#POST_api_submit
TikTok not ready
One vertical video per product, through the Content Posting API — Direct Post (/v2/post/publish/video/init/), which publishes to the profile; the other product, Upload, only leaves a draft in the creator's inbox.
| What it needs | tiktok.json in ~/.config/agent-arena/
or the env var TIKTOK_JSON |
|---|---|
| Console | https://developers.tiktok.com/portal/apps |
| App type | TikTok developer app with the Content Posting API product added and Direct Post enabled — no business account is required, only a developer account, the approved video.publish scope and the user's authorization |
| Scopes | video.publish |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no tiktok.json in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/tiktok.json
|
The click path
- developers.tiktok.com/portal/apps → sign in, create a developer account if there is none, then create an app, add the Content Posting API product, and switch on its Direct Post configuration
- Add scope video.publish
- Complete the OAuth flow for the account: https://www.tiktok.com/v2/auth/authorize/?client_key=…&scope=video.publish&response_type=code&redirect_uri=…&state=… → ?code= → POST https://open.tiktokapis.com/v2/oauth/token/
- Request the audit that lifts private-only posting — until it passes every post is SELF_ONLY
- The product also needs a video at deploy/public/p/<slug>/preview.mp4 — no credential creates one
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
access_token | user access token | required | POST https://open.tiktokapis.com/v2/oauth/token/ (authorization-code exchange); the response also carries refresh_token, which must be stored — the access token lives 2 hours, the refresh token 180 days |
open_id | open_id | optional | returned by the same token exchange |
privacy_level | privacy_level (optional) | optional | must be one of the privacy_level_options returned by /v2/post/publish/creator_info/query/; an unaudited client can only post to a private account, so in practice only SELF_ONLY works until TikTok's audit passes |
refresh_token | …or a refresh token (stored, not yet refreshed by the adapter) | optional | returned by POST https://open.tiktokapis.com/v2/oauth/token/ beside the access token that lives 2 hours; a refresh rotates it and it lives 180 days |
Paste it — proved before it is saved
printf '%s' '{"access_token": ""}' | .venv-v2/bin/python -m v2.channels.setup --save tiktok
Unaudited clients can only post to a private account, and 'All content posted by unaudited clients will be restricted to private viewing mode' until TikTok audits the app. brand_organic_toggle is not a requirement — it is the 'promoting the creator's own business' flag — and is_aigc is optional (it adds the AI-generated label). The document lists brand_content_toggle as required, and the adapter does not send it. Posting is capped at 6 requests per minute per user access token on /v2/post/publish/video/init/. Photos are supported through /v2/post/publish/content/init/ with post_mode=DIRECT_POST and media_type=PHOTO, which this adapter does not use. Docs: https://developers.tiktok.com/docs/en/content-posting-api-reference-direct-post
Mastodon (any server) not ready
One status per product on a server whose rules allow it, through POST /api/v1/statuses.
| What it needs | <host>.token in ~/.config/agent-arena/
or the env var <HOST>_TOKEN |
|---|---|
| Console | https://joinmastodon.org/servers |
| App type | Mastodon application created on that server — Preferences → Development → New application (https://<host>/settings/applications), or the same thing over the API with POST /api/v1/apps |
| Scopes | read:accounts, write:statuses |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no <host>.token in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/<host>.token
|
The click path
- Create the account on the server you want, and tick “This is a bot account” in its profile
- Preferences → Development → New application → scopes read:accounts and write:statuses
- Copy the access token into your own account's folder — `accounts/<account>/<host>.token`, one file per server, so a second server is a second file
- The adapter re-reads the server's rules and refuses if they forbid ads, bots or AI work
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
token | access token (the file holds the bare token, not JSON) | required | Preferences → Development → New application → your access token (the bare string, not JSON — one file per server, named after the host) |
Paste it — proved before it is saved
printf '%s' '{}' | .venv-v2/bin/python -m v2.channels.setup --save mastodon
Tick “This is a bot account” in the profile: the adapter refuses to post without it (this is a rule of this repo, not of Mastodon — Mastodon treats the flag as 'a visual indication only'). Tokens do not expire — “Tokens will not expire automatically. They will become invalid only when deleted by a user or revoked by the app” — so a saved token stays good until it is revoked and no refresh logic is needed. Mastodon 4.3+ accepts the narrower profile scope for verify_credentials; read:accounts remains the portable choice for older servers. Registration can be scripted with POST /api/v1/apps instead of the web form, which is the only path the API docs describe. Docs: https://docs.joinmastodon.org/methods/statuses/
Bluesky ready verified as @demiurge500.bsky.social
One post per product (re-posted at most weekly with a new angle), through the AT Protocol: POST /xrpc/com.atproto.repo.createRecord with collection app.bsky.feed.post.
| What it needs | bluesky.json in ~/.config/agent-arena/
or the env var BLUESKY_JSON |
|---|---|
| Console | https://bsky.app/settings/app-passwords |
| App type | no app needed — an app password for the account (never the account password) |
| Scopes | none |
| Now | file present · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/bluesky.json
· mode 600 |
The click path
- bsky.app → Settings → App Passwords → Add App Password
- Save {"handle": "…", "password": "…"} to bluesky.json — password is the app password, and the same file works for the bsky.social-hosted account only
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
handle | handle | required | the account handle, e.g. demiurge.bsky.social — a lowercase DNS name with at least two segments, no @ prefix in API calls |
password | app password | required | Settings → App passwords → Add app password at https://bsky.app/settings/app-passwords (never the main password); app passwords look like xxxx-xxxx-xxxx-xxxx |
Paste it — proved before it is saved
printf '%s' '{"handle": "", "password": ""}' | .venv-v2/bin/python -m v2.channels.setup --save bluesky
Already wired on this box; the adapter lives in v2/promote.py and is reported, not re-run, by the gate. The access token (accessJwt) expires after a few minutes and a refreshJwt is issued with it, which is why the adapter logs in per run rather than storing one. The service is per-PDS: the docs address $PDSHOST, so bsky.social is only correct for accounts hosted there. Password auth is documented for single-purpose applications such as bots or command line tools; an app with end-user login is expected to use OAuth instead. Docs: https://docs.bsky.app/
Discord not ready
One message per product into one channel, through that channel's incoming webhook: POST https://discord.com/api/webhooks/{webhook.id}/{webhook.token} with {"content": "…"} (content up to 2000 characters, ?wait=true to get the message back).
| What it needs | discord.json in ~/.config/agent-arena/
or the env var DISCORD_JSON |
|---|---|
| Console | https://discord.com/ |
| App type | incoming webhook — no bot, no app review, no OAuth |
| Scopes | none |
| Now | not connected for account acct_1Ufe9MFa4uy7vmVo — no discord.json in this account's folder · /home/hunter/.config/agent-arena/accounts/acct_1Ufe9MFa4uy7vmVo/discord.json
|
The click path
- In the server: Edit Channel → Integrations → Webhooks → New Webhook
- Name it (e.g. “Demiurge shop”), pick the channel, Copy Webhook URL
- That URL is the whole credential — paste it here; it posts to that one channel only
- Paste the webhook URL, not a channel id — the adapter only accepts https://discord.com/api/webhooks/…, or a bot_token plus channel_id
The keys this code parses
| Key | What it is | Where it lives | |
|---|---|---|---|
webhook_url | channel webhook URL | required | Channel → Edit Channel → Integrations → Webhooks → New Webhook → Copy Webhook URL (the URL is https://discord.com/api/webhooks/{id}/{token}) |
bot_token | …or a bot token | optional | discord.com/developers/applications → Bot → Reset Token (the bot must be invited to the server and allowed to Send Messages in that channel) |
channel_id | channel id (with a bot token) | optional | right-click the channel with Developer Mode on → Copy Channel ID |
channel | label (optional) | optional | a name for the setup page only; never sent to Discord |
Paste it — proved before it is saved
printf '%s' '{"webhook_url": ""}' | .venv-v2/bin/python -m v2.channels.setup --save discord
A webhook can only post to the channel it was created in — and if that channel is a forum or media channel it needs thread_id or thread_name as well. A bot token is supported as an alternative and needs the channel shared with the bot. A deleted or regenerated webhook answers 404 with code 10015 “Unknown webhook” — create a new webhook and re-paste the URL rather than retrying. 2000 characters is the ceiling on content, and without ?wait=true a failed send can answer 204 with no error: silence is not success. Docs: https://discord.com/developers/docs/resources/webhook#execute-webhook
Marketplace cannot be automated for this shop — and that is two separate walls
The API wall. There is no Marketplace listing API for a normal Facebook account. Listing on Marketplace is done by a person in the app. The only programmatic route is the Marketplace Partner Item API (https://developers.facebook.com/docs/marketplace/partnerships/itemAPI/), which is restricted to approved Marketplace partners — not something a shop account can turn on.
The policy wall. Meta's Commerce Policy, quoted from the policy page: “Commerce content may not promote the buying, selling, or trading of downloadable digital content, digital subscriptions and digital accounts. … NOT ALLOWED: Listings with downloadable content, including PDFs, music, games, movies, etc.”
Every product this shop sells is a download, so a Marketplace listing would break Meta's Commerce Policy — and no credential fixes that. The draft below is generated anyway: it is the copy-paste text for a product that Marketplace *does* allow (a physical item), and it is the same text the Facebook Page adapter posts. Nothing here posts to Marketplace.
What exists instead, per product: a complete draft — title, price, category, condition, a description
with the tracked demiurge.deals link, and the image files to upload. It is the same text the
Facebook Page adapter posts, which is allowed, and it is what you would paste if a product were a
physical item.
.venv-v2/bin/python -m v2.channels.setup --marketplace <slug>
TikTok was off because no product had a video — each one has one now.
The Content Posting API takes video and nothing else, so a still was never an option.
52 of 52 live products ship a vertical video now. Each one is a 9:16 slideshow built from the product's own renders, with a title card that says
what it is and that AI made it — deploy/public/p/<slug>/preview.mp4, checked back with
ffprobe. A product added later without one is skipped by the channel with that reason, not posted as a
picture.
.venv-v2/bin/python -m v2.channels.video --all # builds one per product that has renders .venv-v2/bin/python -m v2.channels.video --slug <slug> --force
A TikTok token is still needed (tiktok.json),
and an unaudited app can only publish privately (privacy_level: SELF_ONLY) until TikTok audits it.
The check is the platform's own whoami call
- The credential is sent to the venue's read-only identity endpoint —
/2/users/me,/v2/userinfo,/me,verify_credentials, the webhook's own GET. - The reply must carry the identity that endpoint reports. HTTP 401/403, or a reply with no identity, is a refusal: it is shown as the platform's own words and nothing is written.
- Only then is
~/.config/agent-arena/<channel>.jsonwritten, mode600, holding just the keys that channel's adapter parses. - The result is recorded in
verified.json, which is what the badges above read. A file whose last verification failed says so.
.venv-v2/bin/python -m v2.channels.setup --serve # 127.0.0.1:8799, token in ~/.config/agent-arena/setup.token .venv-v2/bin/python -m v2.channels.setup --state # the same table as above, in a terminal
The setup server binds loopback only, requires the token from
setup.token on every call, and refuses a browser origin that is not this site. The desktop app
uses it for the paste box; the terminal command works without it.