{"record":{"id":"1a6fdeaaeefe2164","repo":"binary-husky/gpt_academic","slug":"authentication-failed-you-have-not-been-accepted","errorCode":null,"errorMessage":"Authentication failed. You have not been accepted into the beta.","messagePattern":"Authentication failed\\. You have not been accepted into the beta\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"request_llms/edge_gpt_free.py","lineNumber":345,"sourceCode":"                self.session.cookies.set(cookie[\"name\"], cookie[\"value\"])\n        # Send GET request\n        response = self.session.get(\n            url=os.environ.get(\"BING_PROXY_URL\")\n            or \"https://edgeservices.bing.com/edgesvc/turing/conversation/create\",\n        )\n        if response.status_code != 200:\n            response = self.session.get(\n                \"https://edge.churchless.tech/edgesvc/turing/conversation/create\",\n            )\n        if response.status_code != 200:\n            print(f\"Status code: {response.status_code}\")\n            print(response.text)\n            print(response.url)\n            raise Exception(\"Authentication failed\")\n        try:\n            self.struct = response.json()\n        except (json.decoder.JSONDecodeError, NotAllowedToAccess) as exc:\n            raise Exception(\n                \"Authentication failed. You have not been accepted into the beta.\",\n            ) from exc\n        if self.struct[\"result\"][\"value\"] == \"UnauthorizedRequest\":\n            raise NotAllowedToAccess(self.struct[\"result\"][\"message\"])\n\n    @staticmethod\n    async def create(\n        proxy=None,\n        cookies=None,\n    ):\n        self = _Conversation(async_mode=True)\n        self.struct = {\n            \"conversationId\": None,\n            \"clientId\": None,\n            \"conversationSignature\": None,\n            \"result\": {\"value\": \"Success\", \"message\": None},\n        }\n        self.proxy = proxy","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/binary-husky/gpt_academic/blob/d6bde0fa54373309bd05823a49bda8da019d2c77/request_llms/edge_gpt_free.py#L327-L363","documentation":"Synchronous conversation-creation variant: the HTTP call succeeded (or the fallback was used) but response.json() raised JSONDecodeError (or NotAllowedToAccess), meaning the endpoint returned HTML/an error page instead of the conversation JSON. edge_gpt_free wraps this as 'Authentication failed. You have not been accepted into the beta.'","triggerScenarios":"request_llms/edge_gpt_free.py:345: conversation/create responds 200-family or redirects to an HTML consent/block page (e.g. Bing challenge, region gate), so parsing JSON fails. Common when the account/cookie is not enrolled in the Copilot beta or Bing serves a captcha page.","commonSituations":"Cookies from a browser not signed into Copilot; datacenter IP served an interstitial; churchless fallback proxy returning an HTML error page; endpoint schema changed after a Bing update breaking this free client.","solutions":["Inspect the printed response text — HTML indicates a consent/captcha/region page; act accordingly (fresh cookies from an enrolled browser session)","Regenerate NEWBING_COOKIES from an Edge browser where Copilot works, then retry","Route through a residential/clean egress IP or a working BING_PROXY_URL","If the API surface changed, update the pinned edge_gpt_free client or migrate to an official API-backed bridge"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import json, requests\nr = requests.get('https://edgeservices.bing.com/edgesvc/turing/conversation/create', cookies=cookies, timeout=10)\ntry:\n    r.json()\n    json_ok = True\nexcept ValueError:\n    json_ok = False  # HTML gate page -> this error will follow\nprint('endpoint returns JSON:', json_ok)","typeGuard":null,"tryCatchPattern":"try:\n    convo = _Conversation(...)\nexcept Exception as e:\n    if 'not been accepted into the beta' in str(e):\n        cookies = harvest_fresh_edge_cookies()  # enroll + export cookie jar\n        convo = _Conversation(..., cookies=cookies)\n    else:\n        raise","preventionTips":["Export the whole cookie jar from a Copilot-enabled Edge profile, not just _U","Avoid datacenter IPs for the free Bing bridge","Detect HTML responses early (content-type check) and fail with a clear message"],"tags":["bing","authentication","json-parsing","third-party-api"],"backgroundTag":null,"analyzedSha":"d6bde0fa54373309bd05823a49bda8da019d2c77","analyzedAt":"2026-08-14T22:48:35.038Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}