# platform.openai.com Signup 协议侦察报告 > **Version**: 1.0 > **Author**: protocol-recon (AutoTeam / platform-signup) > **Date**: 2026-04-25 > **Scope**: 为 `platform_signup.py` 的 HTTP 注册模块实现提供协议清单。 > **Status**: 公开资料整理完成;Arkose/签名 cookie 两处明确标记 **"需要 mitmproxy 抓包"**。 --- ## 0. 结论先行(Executive Summary) - `platform.openai.com` 与 `chatgpt.com` **共用同一个 OpenAI 账号体系**:都由 `auth.openai.com`(Auth0 自托管前端,底层 `openai.auth0.com`)签发 session。官方帮助中心原话:"your ChatGPT and API Platform share the same underlying org-id"。 - 创建 Platform 账号 **本质上就是创建一个 OpenAI 账号**(走 Auth0 Universal Login 的 **Signup** 分支)。分歧点在**登录后的首次进入页**: - Platform 侧首次登录要求**绑定手机号**(才能创建 API Key / 开账单) - ChatGPT 侧**不强制**手机号 - Auth0 状态机(signup 模式)与 OpenAIAuth 逆向的 login 模式**共用 80% 端点**,唯一差异是第 1~2 步(`authorize` 的 `screen_hint=signup` + `POST /u/signup/identifier`/`/u/signup/password`)。 - 三道硬阻断点: 1. **Cloudflare Turnstile / Bot Fight Mode**(JS 挑战,不可免) 2. **Arkose Labs FunCaptcha**(注册页嵌入,pre-registration action 验 token) 3. **手机号验证**(platform 强制、chatgpt 偶尔触发) **可行性判断**: 纯 HTTP 复刻 signup 在没有 Arkose token 解决方案的前提下 **不可行**。必须走 Playwright + Arkose 第三方解决服务,或者在可控浏览器里拿 `arkose_token` 后再回落到 HTTP。 --- ## 1. 完整请求序列 > **约定**: > - `{APP_CLIENT_ID}`:Platform 前端使用的 Auth0 client_id。**公开资料中未出现明文**(参见 §5)。已知 Codex CLI 使用 `app_EMoamEEZ73f0CkXaXp7hrann`(见 `src/autoteam/codex_auth.py:32`)。 > - `{STATE}`:Auth0 签出的不透明 state 串,形如 `hKFo2SBxxxxxxxxxxx...`(由 `/authorize` 302 跳转到 `/u/signup?state=...` 带出)。 > - `{CSRF}`:`auth0.openai.com` 通过 `_csrf` cookie + 页面 `` 双向校验(非固定名字,可能是 `state` 本身;OpenAIAuth 实现里直接复用 `state` 作为 CSRF 载体)。 ### 1.1 Signup 分支(推测,基于 Auth0 Universal Login 规范 + acheong08/OpenAIAuth 的 Login 镜像) | # | Method | URL | Headers 关键字段 | Body Schema | 期望响应 | State 透传 | |---|--------|-----|-----------------|-------------|---------|------------| | 1 | GET | `https://platform.openai.com/signup` | `User-Agent`, `Accept-Language` | —— | `200` + HTML (Next.js 前端) + Cloudflare 可能返回 Turnstile JS 挑战 | 生成 `cf_clearance` cookie | | 2 | GET | `https://platform.openai.com/api/auth/csrf`(若存在,类似 ChatGPT Next.js)| `Host`, `Accept: */*` | —— | `{"csrfToken":"..."}` | 取 `csrfToken` | | 3 | POST | `https://platform.openai.com/api/auth/signin/auth0?prompt=login&screen_hint=signup` | `Content-Type: application/x-www-form-urlencoded`, `Origin: https://platform.openai.com` | `callbackUrl=/&csrfToken={CSRF}&json=true` | `{"url":"https://auth.openai.com/authorize?..."}` | 取 `url` | | 4 | GET | `https://auth.openai.com/authorize?client_id={APP_CLIENT_ID}&scope=openid+profile+email+offline_access&response_type=code&redirect_uri=https%3A%2F%2Fplatform.openai.com%2Fauth%2Fcallback&audience=https%3A%2F%2Fapi.openai.com%2Fv1&prompt=login&screen_hint=signup&state={RANDOM}&code_challenge={PKCE_S256}&code_challenge_method=S256` | —— | `302 Location: https://auth.openai.com/u/signup/identifier?state={STATE}` | `{STATE}` 写入 URL | | 5 | GET | `https://auth.openai.com/u/signup/identifier?state={STATE}` | —— | `200` + HTML,包含 `` 和 `