quorlasocial/docs/google-app.md
metatroncubeswdev fc2179b343 Track platform quotas; wait and retry instead of failing
- quota.js: per-platform limits (YouTube 10,000 units/day Pacific per project,
  Instagram 100 / Threads 250 / TikTok 15 posts per 24 h per account, ...),
  usage log, .env overrides (QUOTA_<PLATFORM>)
- Publishing checks the budget first and records usage; when a platform is
  out of quota (or answers quota exceeded / 429) the post stays approved and
  the queue retries after the reset, without re-posting finished platforms
- Drafts that exceed a day's limit get a warning
- Connections page shows used/limit and when it frees up
- Tests for windows (incl. DST), shared vs per-account limits and the
  wait-and-retry queue flow; docs for quotas and the Google app setup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:56:54 -04:00

27 lines
2.1 KiB
Markdown

# Google app: Quorla (YouTube + Google Business Profile)
- Google Cloud project **Quorla** (ID `quorla`) in the **metatroncubesolutions.com** organization, created with
dev@metatroncubesolutions.com.
- APIs enabled: YouTube Data API v3, My Business Account Management API, My Business Business Information API,
Google My Business API. No billing account needed; all are free within quota.
- OAuth consent screen (Google Auth Platform): app name Quorla, logo `branding/quorla-icon-1024.png`, support and
developer contact dev@metatroncubesolutions.com, home https://app.quorlasocial.com, privacy /privacy, terms /terms,
authorized domain quorlasocial.com. Audience **External**, publishing status **Testing**.
- Scopes: openid, userinfo.email, business.manage (non-sensitive); youtube.upload, youtube.readonly (sensitive).
No restricted scopes, so no paid security assessment is needed.
- Test users (only these can connect while in Testing; max 100): dev@metatroncubesolutions.com,
metatroncubesoftwaresolutions@gmail.com. Add each client's Google account here until the app is verified.
- OAuth web client "Quorla web (app.quorlasocial.com)" with redirect URIs
https://app.quorlasocial.com/oauth/youtube/callback and https://app.quorlasocial.com/oauth/gbp/callback.
Its ID and secret are in the PC's `.env` as YOUTUBE_CLIENT_ID/SECRET and GBP_CLIENT_ID/SECRET; copy those four lines
to the server's `.env`, or enter them in Quorla → Connections → Set up. Google shows the secret only once; if it is
lost, add a new secret on the client in Google Cloud.
## Still to do
1. **Business Profile API access**: request it (Google form) for project number of `quorla`; until approved the
Business Profile APIs have a quota of 0.
2. **Verify quorlasocial.com in Google Search Console** (DNS TXT record) — required before Google verifies the app.
3. After deploy: **publish the app** (Audience → Publish app) and submit **verification** (sensitive YouTube scopes):
Google asks for a demo video of the sign-in and how each scope is used.
4. **YouTube API audit** (free form) to lift the 10,000 units/day quota and the private-only upload limit.