---
title: get-auth-token-metadata
product: vercel
url: /docs/rest-api/authentication/get-auth-token-metadata
canonical_url: "https://vercel.com/docs/rest-api/authentication/get-auth-token-metadata"
last_updated: 2026-09-15
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about get-auth-token-metadata on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Get Auth Token Metadata

```http
GET /v5/user/tokens/{tokenId}
```

Retrieve metadata about an authentication token belonging to the currently authenticated User.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `tokenId` | string | Yes | The identifier of the token to retrieve. The special value "current" may be supplied, which returns the metadata for the token that the current HTTP request is authenticated with. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v5/user/tokens/tokenId', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

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

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v5/user/tokens/tokenId', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X GET 'https://api.vercel.com/v5/user/tokens/tokenId' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
{
  "token": {
    "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391",
    "name": "Example Name",
    "type": "oauth2-token",
    "prefix": "vcp_",
    "suffix": "abc123",
    "origin": "github",
    "scopes": [
      {
        "type": "user",
        "sudo": {},
        "origin": "app",
        "createdAt": "123",
        "expiresAt": "123"
      }
    ],
    "createdAt": "1632816536002",
    "activeAt": "1632816536002",
    "expiresAt": "1632816536002",
    "revokedAt": "1632816536002",
    "leakedAt": "1632816536002",
    "leakedUrl": "https://example.com"
  }
}
```

## Responses

### 200: Successful response.

Content-Type: `application/json`

```json
{
  "type": "object",
  "description": "Successful response.",
  "required": [
    "token"
  ],
  "properties": {
    "token": {
      "type": "object",
      "description": "Authentication token metadata.",
      "required": [
        "activeAt",
        "createdAt",
        "id",
        "name",
        "type"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier of the token."
        },
        "name": {
          "type": "string",
          "description": "The human-readable name of the token."
        },
        "type": {
          "type": "string",
          "description": "The type of the token."
        },
        "prefix": {
          "type": "string",
          "description": "The token's prefix, for identification purposes."
        },
        "suffix": {
          "type": "string",
          "description": "The last few characters of the token, for identification purposes."
        },
        "origin": {
          "type": "string",
          "description": "The origin of how the token was created."
        },
        "scopes": {
          "type": "array",
          "description": "The access scopes granted to the token.",
          "items": {}
        },
        "createdAt": {
          "type": "number",
          "description": "Timestamp (in milliseconds) of when the token was created."
        },
        "activeAt": {
          "type": "number",
          "description": "Timestamp (in milliseconds) of when the token was most recently used."
        },
        "expiresAt": {
          "type": "number",
          "description": "Timestamp (in milliseconds) of when the token expires."
        },
        "revokedAt": {
          "type": "number",
          "description": "Timestamp (in milliseconds) of when the token was revoked."
        },
        "leakedAt": {
          "type": "number",
          "description": "Timestamp (in milliseconds) of when the token was marked as leaked."
        },
        "leakedUrl": {
          "type": "string",
          "description": "URL where the token was discovered as leaked."
        }
      }
    }
  }
}
```

### 400: One of the provided values in the request query is invalid.

### 401: No description

### 403: You do not have permission to access this resource.

### 404: Token not found with the requested `tokenId`.

### 410: No description

---

## Related

- [authentication endpoints](/docs/rest-api#authentication)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://openapi.vercel.sh/) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
