---
title: "Generate O Auth Code Query"
method: GET
path: "/api/oauth/state"
tags: ["OAuth"]
---

# Generate O Auth Code Query

`GET /api/oauth/state`

## Request

- Base URL: `https://api.unorouter.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.unorouter.com/api/oauth/state`
- Auth: none required

## Query parameters

- `turnstile` string
- `provider` string
- `intent` string
- `aff` string
- `redirect_uri` string
- `action` string
- `customer_type` string
- `scope` string
- `context` string
- `terms_version` string
- `terms_locale` string
- `terms_text` string

## Response `200`

OK

- ResponseString: Response_string schema
  - `data` string, required
  - `message` string, required
  - `success` boolean, required

## Changes

- **2026-10-20** `6d0299fb6d6c`: 3 info
  - added the new optional `query` request parameter `terms_locale`
  - added the new optional `query` request parameter `terms_text`
  - added the new optional `query` request parameter `terms_version`
- **2026-10-15** `6cb670e861f5`: 3 info
  - added the new optional `query` request parameter `context`
  - added the new optional `query` request parameter `customer_type`
  - added the new optional `query` request parameter `scope`

[Operation history](https://skmtc.dev/unorouter/apis/new-api/changes/api/oauth/state/get.md)

---

[API](https://skmtc.dev/unorouter/apis/new-api.md) - [All operations](https://skmtc.dev/unorouter/apis/new-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unorouter/apis/new-api/revisions/1b50ada14f59?raw)
