# List userinfo

URL: https://docs.hanzo.ai/docs/openapi/deploy/get-deploy-session-userinfo

> Answers "is this browser signed in, and if not where does it sign in?" — the dashboard SPA's bootstrap question, and the only route on this plane that answers for an anonymous caller.

`GET /v1/deploy/session/userinfo`

> [Deploy →](https://docs.hanzo.ai/docs/openapi/deploy) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                   |
| ------------- | ------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/deploy/session/userinfo` |
| **Method**    | `GET`                                             |
| **Operation** | `get_deploy_session_userinfo`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`            |

Answers "is this browser signed in, and if not where does it
sign in?" — the dashboard SPA's bootstrap question, and the only route on this
plane that answers for an anonymous caller.

The anonymous answer carries loggedIn:false and a URL and NOTHING else: no
username, no org, no groups, no issuer, no hint about who the caller might be or
what exists in the cluster. Answering it costs nothing (the caller already knows
whether it holds a cookie) and withholding it costs the whole sign-in journey.

The predicate is the platform SuperAdmin fact — the SAME one every other route
here gates on, minted from a validated principal whose org is the reserved admin
org — so a validated-but-not-SuperAdmin caller is reported as NOT signed in,
which is the truth as this console defines it: they cannot use it.

## Request

`GET /v1/deploy/session/userinfo` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body               | Meaning |
| --------- | ------------------ | ------- |
| `200`     | deploy.sessionUser | ok      |
| `default` | problem-details    | refused |

`200` body — 6 fields.

| Field       | In   | Type      | Always | Description                                                                                                                                                                       |
| ----------- | ---- | --------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `groups`    | body | string\[] | —      | Groups is the caller's group list, always empty here: this console authorizes on the platform SuperAdmin fact alone, not on argocd RBAC groups.                                   |
| `iss`       | body | string    | —      | Iss is the token issuer as the SPA expects to see it — the literal "argocd", so the UI never triggers an SSO redirect of its own.                                                 |
| `loggedIn`  | body | boolean   | —      | LoggedIn reports whether this browser holds a session this console accepts.                                                                                                       |
| `loginUrl`  | body | string    | —      | LoginURL is where an anonymous caller signs in.                                                                                                                                   |
| `logoutUrl` | body | string    | —      | LogoutURL is where a signed-in caller ends the session.                                                                                                                           |
| `username`  | body | string    | —      | Username is the validated principal's user ID — the opaque gateway id, which is what argocd's UI renders as the signed-in user here — or "admin" when the principal carries none. |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo deploy session userinfo
```

**SDK**

**.ts**

```ts
import { Configuration, DeployApi } from 'hanzoai';

const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDeploySessionUserinfo();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DeployApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DeployApi(client).get_deploy_session_userinfo()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DeployAPI.GetDeploySessionUserinfo(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, deploy_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = deploy_api::get_deploy_session_userinfo(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DeployApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new DeployApi(client).getDeploySessionUserinfo();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/deploy/session/userinfo \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `deploy`, op `get_deploy_session_userinfo` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "deploy",
         "arguments": {
           "op": "get_deploy_session_userinfo",
           "input": {}
         }
       }
     }'
```

---

[Deploy API](https://docs.hanzo.ai/docs/openapi/deploy) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
