# UserInfo endpoint (OIDC Core §5.3)

> Source: https://elaichi.ai/docs/api-reference/mcp-oauth/oauth/getuserinfo/

`GET /oauth/userinfo`

Resource: **Oauth** · API: **MCP OAuth**

## Response body

- **`sub`** _(string)_
  Stable, opaque subject identifier (`usr_…`). Same value for every client — `subject_types_supported: ["public"]`.
- **`email`** _(string)_
  Present only when the grant holds the `email` scope.
- **`email_verified`** _(boolean)_
  Present only alongside `email`. Derived from how the account authenticates (a consumed email code, a signed SSO assertion over a DNS-verified org domain, an identity provider that publishes and enforces its own verification signal) — never a self-reported flag.

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/oauth/userinfo' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/oauth/userinfo', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/oauth/userinfo"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
