--- id: "2fd2f809-00c3-4534-9e38-2add0fe89aff" name: "ChatGPT Clean Transcript" micro_summary: "Fetch the conversation API, walk current_node ancestry, remove hidden/tool/internal messages, and report the result per the Clean Transcript Query output contract." status: "resolved" see_also: [] scope: "Extract clean active-lineage user/assistant Markdown or JSON from an authenticated ChatGPT conversation through browser-harness." warnings: "ChatGPT’s conversation endpoint is private and may change. Never print or persist its bearer token or put conversation IDs, titles, or transcript contents in the shared skill tree." --- ## ChatGPT Clean Transcript - Fetch `/api/auth/session`, then `/backend-api/conversation/`; keep the bearer token inside page JavaScript. - Walk `current_node → parent`, then reverse; do not timestamp-sort the entire mapping because it may contain abandoned branches. - Keep visible user/assistant text, excluding hidden messages and assistant messages addressed to tools. - Preserve timestamp, message ID, parent ID, role, and transcript text. - Emit Markdown/JSON; report the result per the output contract in [[Clean Transcript Query|38ff3f8b-7215-4cfe-940f-10b689d4c824@2ba39fc8-0d4b-4f63-8a35-f198552fbb71]] — that node owns the counting method and field order. - Verified result: 108 messages, 53,433 tokens. Conversation identity and contents omitted.