# Inspect the current token — API reference

> Shows the API version, authentication method, scopes, Company role, user, team and client context for the authenticated key.

Source: https://upfour.io/docs/api/me/inspect-the-current-token

[Developers](https://upfour.io/docs/api.md)/[Token introspection](https://upfour.io/docs/api/me.md)

Shows the API version, authentication method, scopes, Company role, user, team and client context for the authenticated key.

GET https://app.upfour.io/v1/me

scope self.read stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `limit` optional | integer 1–250 default `50` | query parameter |
| `cursor` optional | string | query parameter |
| `client_id` optional | uuid | query parameter |
| `all_clients` optional | boolean | query parameter |
| `q` optional | string | query parameter |
| `sort` optional | string | query parameter |

## Returns

A successful request returns `200` with application/json.

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | TokenIntrospectionResponse | |
| TokenIntrospectionResponse · 12 fields FieldTypeDescription `auth_method` any How the request authenticated: api_key on the public API. `client_set` ClientSet ClientSet · 3 fields FieldTypeDescription `All` boolean `CompanyLevel` boolean `IDs` uuid[]  · nullable `org_id` uuid `org_role` string one of`owner` `admin` `member` `viewer` `api_key_id` string `api_version` string `scopes` string[] The permissions of the API key. `team_id` string `user_id` string | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

The specification does not list additional operation-specific errors.

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

## Request

### cURL

```bash
curl -s "https://app.upfour.io/v1/me" \
  -H "Authorization: Bearer $UP4_API_KEY"
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/me", {
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://app.upfour.io/v1/me",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.upfour.io/v1/me", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(out))
}
```

### PHP

```php
<?php
$ch = curl_init("https://app.upfour.io/v1/me");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
    ],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 200

```json
{
  "data": {
    "api_key_id": "00000000-0000-4000-8000-000000000001",
    "api_version": "2026-05-07",
    "auth_method": "api_key",
    "client_set": {
      "All": true,
      "CompanyLevel": true,
      "IDs": null
    },
    "org_id": "00000000-0000-4000-8000-000000000002",
    "org_role": "owner",
    "scopes": [
      "api_key.read",
      "api_key.write",
      "audit_log.read",
      "billing.read",
      "billing.write",
      "client.read",
      "client.write",
      "escalation_policy.read",
      "escalation_policy.write",
      "evidence.read",
      "evidence.write",
      "feature_flag.read",
      "feature_flag.write",
      "heartbeat.read",
      "heartbeat.write",
      "incident.read",
      "incident.write",
      "member.read",
      "member.write",
      "metadata.read",
      "metadata.write",
      "monitor.delete",
      "monitor.read",
      "monitor.write",
      "not.a.permission",
      "notification_channel.read",
      "notification_channel.write",
      "oncall.read",
      "oncall.write",
      "organization.read",
      "organization.write",
      "report.read",
      "report.write",
      "runbook.read",
      "runbook.write",
      "self.read",
      "status_page.read",
      "status_page.subscriber.write",
      "status_page.write",
      "team.read",
      "team.write",
      "webhook.read",
      "webhook.write"
    ],
    "user_id": "00000000-0000-4000-8000-000000000003"
  }
}
```
