---
title: "Get a live same-origin CSRF token"
method: GET
path: "/api/v1/csrf"
tags: ["User"]
---

# Get a live same-origin CSRF token

`GET /api/v1/csrf`

Returns the token for the caller's current browser session and whether it is authenticated. The response is private and never cacheable.

## Response `200`

Session CSRF state

- object
  - `csrf` string
  - `logged_in` boolean

---

[API](https://skmtc.net/openmercantil/apis/openmercantil-public-api.md) · [All operations](https://skmtc.net/openmercantil/apis/openmercantil-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmercantil/openmercantil-public-api/versions/996f96a11758/schema)
