---
title: "Get the logged-in user's API key (session-only)"
method: GET
path: "/api/v1/visa/auth/ensure-key"
tags: ["Account & billing"]
---

# Get the logged-in user's API key (session-only)

`GET /api/v1/visa/auth/ensure-key`

## Request

- Base URL: `https://visa.orizn.app`
- URL: `https://visa.orizn.app/api/v1/visa/auth/ensure-key`
- Auth: API key in cookie `orizn_token`
- TypeScript: <https://skmtc.dev/orizn/apis/orizn-visa-api/docs/api/v1/visa/auth/ensure-key/get.ts> (a function with typed inputs; its response is checked against the schema)

Dashboard helper. Session-cookie only — not callable through RapidAPI.

## Response `200`

User and API key.

- EnsureKeyResponse
  - `user` object
    - `id` integer
    - `orizn_id` string
    - `email` string, email
    - `name` string
    - `photo` string, uri
    - `plan` 'free' | 'starter' | 'pro' | 'business' | 'enterprise'
    - `api_key` string
    - `requests_month` integer
    - `requests_total` integer
    - `monthly_limit` integer
    - `created_at` string, date-time

## Other responses

- `400`: Missing or malformed parameter.
- `401`: Missing API key, query param or session cookie.

---

[API](https://skmtc.dev/orizn/apis/orizn-visa-api.md) - [All operations](https://skmtc.dev/orizn/apis/orizn-visa-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orizn/apis/orizn-visa-api/revisions/7d2f2bc68d08?raw)
