fix: update debug_auth.py to check accessToken presence by key
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,4 +23,15 @@ print("Calling /api/auth/session (with Chrome TLS impersonation) ...")
|
||||
r = s.get("https://chatgpt.com/api/auth/session", timeout=15)
|
||||
print(f"Status: {r.status_code}")
|
||||
print(f"Content-Type: {r.headers.get('content-type', '(none)')}")
|
||||
print(f"Response body (first 500 chars):\n{r.text[:500]}")
|
||||
|
||||
try:
|
||||
data = r.json()
|
||||
print(f"Top-level keys: {list(data.keys())}")
|
||||
access_token = data.get("accessToken")
|
||||
if access_token:
|
||||
print(f"accessToken: FOUND (length={len(access_token)}, starts with '{access_token[:10]}...')")
|
||||
else:
|
||||
print("accessToken: NOT FOUND in response")
|
||||
print(f"Full response body:\n{r.text}")
|
||||
except Exception as e:
|
||||
print(f"Could not parse JSON: {e}\nRaw body:\n{r.text[:500]}")
|
||||
|
||||
Reference in New Issue
Block a user