---
title: "Preview OAuth consent"
method: GET
path: "/api/oauth/consent"
tags: ["OAuth"]
---

# Preview OAuth consent

`GET /api/oauth/consent`

## Request

- Base URL: `https://git.cafe`
- URL: `https://git.cafe/api/oauth/consent`
- Auth: API key in cookie `gc-session`

Returns the registered client and requested access for same-origin human review.

## Query parameters

- `request_id` string, required

## Response `200`

Response for status 200

- object
  - `requestId` string, required
  - `client` object, required
    - `id` union, required
      - string
      - string, uri
    - `name` string, required
    - `redirectUri` string, uri, required
  - `app` object, nullable, required
    - `name` string, required
    - `publisher` string, required
    - `iconUrl` string, nullable, required
  - `resource` string, uri, required
  - `resources` string[], required
  - `scopes` string[], required
  - `identity` string[], required
  - `current` object, nullable, required
    - `scopes` string[], required
    - `scopesChange` boolean, required
    - `repositories` union, required
      - object
        - `mode` 'all', required
      - object
        - `mode` 'selected', required
        - `items` object[], required
          - `id` string, required
          - `owner` string, required
          - `name` string, required
  - `narrowable` boolean, required
  - `installations` object[], required
    - `id` string, required
    - `org` string, required
    - `resources` string[], required
    - `repositories` object[], required
      - `id` string, required
      - `owner` string, required
      - `name` string, required
      - `visibility` 'public' | 'private', required
    - `current` object, nullable, required
      - `scopes` string[], required
      - `scopesChange` boolean, required
      - `repositories` union, required
        - object
          - `mode` 'all', required
        - object
          - `mode` 'selected', required
          - `items` object[], required
            - `id` string, required
            - `owner` string, required
            - `name` string, required
  - `maxRepositories` integer, required
  - `expiresAt` string, date-time, required
  - `lifetime` object, required
    - `kind` 'idle' | 'fixed', required
    - `seconds` integer, required
  - `csrfToken` string, required

## Other responses

- `400`: The request is invalid.
- `401`: Authentication is required, or the supplied credential is invalid.
- `403`: The credential does not permit this operation. A `code`, when present, names the refusal.
- `404`: The resource does not exist or is not visible to the caller.
- `409`: The request conflicts with the current state. A `code`, when present, names the refusal; `retryable` says whether the same request can succeed later, and `operationId` names the operation in the way.
- `429`: A rate limit is exhausted. Wait Retry-After seconds; the value is a hint, so back off on a repeat 429.
- `503`: A required service is temporarily unavailable; retry later.

---

[API](https://skmtc.dev/gitcafe/apis/git-cafe-api.md) - [All operations](https://skmtc.dev/gitcafe/apis/git-cafe-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitcafe/apis/git-cafe-api/revisions/9fa233d2986d?raw)
