> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runtm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Current User

> Get information about the authenticated user

Retrieve information about the currently authenticated user or service account. Useful for validating API keys and checking permissions.

## Response

**tenant\_id** `string`

The tenant/organization ID

**principal\_id** `string`

The user or service account ID

**scopes** `array`

List of API key scopes: `read`, `deploy`, `delete`, `admin`

```bash cURL theme={null}
curl -X GET "https://app.runtm.com/api/v1/me" \
  -H "Authorization: Bearer runtm_xxx"
```

```python Python theme={null}
import requests

response = requests.get(
    "https://app.runtm.com/api/v1/me",
    headers={"Authorization": "Bearer runtm_xxx"}
)

if response.status_code == 200:
    data = response.json()
    print(f"Tenant: {data['tenant_id']}")
    print(f"Scopes: {', '.join(data['scopes'])}")
else:
    print("Invalid API key")
```

```javascript JavaScript theme={null}
const response = await fetch(
  "https://app.runtm.com/api/v1/me",
  {
    headers: {
      "Authorization": "Bearer runtm_xxx"
    }
  }
);

if (response.ok) {
  const data = await response.json();
  console.log(`Tenant: ${data.tenant_id}`);
  console.log(`Scopes: ${data.scopes.join(", ")}`);
} else {
  console.log("Invalid API key");
}
```

```json 200 theme={null}
{
  "tenant_id": "tenant_abc123",
  "principal_id": "user_xyz789",
  "scopes": ["read", "deploy", "delete"]
}
```

```json 401 theme={null}
{
  "detail": {
    "error": "Invalid or expired API key"
  }
}
```

> [!NOTE]
>
> This endpoint is commonly used to verify API key validity and check available permissions before making other API calls.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.