* The token's team and account email, to name the connection. Needs the * `account:read` scope, which a narrowly scoped personal token may lack: * callers treat a refusal as "unknown", not as a failed sign-in.
()
| 338 | * callers treat a refusal as "unknown", not as a failed sign-in. |
| 339 | */ |
| 340 | async getAccount() { |
| 341 | const body = await request("GET", ACCOUNT_PATH); |
| 342 | const account = body?.account; |
| 343 | if (!account) return null; |
| 344 | return { |
| 345 | uuid: account.team?.uuid ?? null, |
| 346 | name: account.team?.name ?? null, |
| 347 | email: account.email ?? null, |
| 348 | }; |
| 349 | }, |
| 350 | }; |
| 351 | } |