---
title: "Generate Access Token"
method: POST
path: "/v1/token"
tags: ["Portfolio Connect"]
---

# Generate Access Token

`POST /v1/token`

Generate a short-lived access token from your API key.

**Use this endpoint from your backend** to create tokens that can be safely passed to frontend/SDK.

**Legacy path:** `/v1/access-token` (still supported)

Access tokens:
- Are prefixed with `at_` for easy identification
- Valid for up to 60 minutes
- Can be used in place of API keys on all v4 endpoints
- Cannot be used to generate other access tokens

## Request body

- object
  - `expiry_minutes` integer — Token validity in minutes (max 60)

## Response `200`

Access token generated successfully

- object
  - `access_token` string — The at_ prefixed access token
  - `expires_in` integer — Token validity in seconds
  - `token_type` string — Always "api_key" - token is a drop-in replacement for x-api-key header

## Other responses

- `400` — Bad request (e.g., trying to create token from access token)
- `401` — Unauthorized. This can happen if the `x-api-key` header is missing.

---

[API](https://skmtc.net/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech.md) · [All operations](https://skmtc.net/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casparser/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech/revisions/fa7d3aae2ab9/schema)
