# ATXP Web Registration — JWT Token Format Web-регистрация через accounts.atxp.ai (Privy + HuskMail) даёт JWT токены. ## JWT Structure ``` Header: {"alg":"RS256","typ":"JWT","kid":"R2Gfh6KKf8-8wgJcuG8FyDbbj2KXTK71rymu8y0mP1I"} Payload: {"iss":"https://auth.atxp.ai","sub":"atxp_acct_XXX","aud":"abundance_consumer", "exp":...,"iat":...,"email":"...@huskmail.xyz","email_verified":true, "atxp_connection_token":"K72U7WT8ndH3oLWCnVlm1", "org":{"id":"personal_atxp_acct_XXX","name":"Personal","role":"owner"}} ``` ## Decoding (Python) ```python import base64, json parts = token.split('.') payload = parts[1] + '==' data = json.loads(base64.urlsafe_b64decode(payload)) account_id = data['sub'] # atxp_acct_XXX connection_token = data['atxp_connection_token'] # The actual token email = data['email'] # dasdas@huskmail.xyz org = data.get('org', {}) # org info (main accounts only) ``` ## Key Fields | Field | Agent (CLI) | Main (Web) | |-------|-------------|------------| | `aud` | `abundance_consumer` | `abundance_consumer` | | `org` | absent | `{id, name, role}` | | `email_verified` | true | true | | `exp` | 1h from iat | 1h from iat | | Balance | $0 IOU | $10.55-$10.75 | ## Connection String ``` https://accounts.atxp.ai?connection_token={atxp_connection_token}&account_id={sub} ``` ## Usage - `npx atxp login --token "CONNECTION_STRING"` — CLI login - `Authorization: Bearer CONNECTION_STRING` — MCP/LLM API - JWT itself NOT accepted by LLM Gateway (401) - Connection string works for MCP, LLM Gateway (restricted), CLI