---
title: "اعتبارسنجی درخواست اجازه و داده‌های صفحه‌ی consent"
method: GET
path: "/oauth/authorize"
tags: ["oauth"]
---

# اعتبارسنجی درخواست اجازه و داده‌های صفحه‌ی consent

`GET /oauth/authorize`

## Request

- Base URL: `https://barchin.net/api`
- URL: `https://barchin.net/api/oauth/authorize`
- Auth: HTTP bearer

همان پارامترهای آدرس /oauth/authorize را می‌گیرد (نشست داشبورد لازم است) و برنامه، scopeها و کاربر را برای صفحه‌ی اجازه برمی‌گرداند. خطاها 400 با code هستند؛ اگر برنامه و redirect_uri معتبر باشند redirect_to هم می‌آید تا مرورگر با error به برنامه برگردد.

## Query parameters

- `response_type` string, nullable
- `client_id` string, nullable
- `redirect_uri` string, nullable
- `scope` string, nullable
- `state` string, nullable
- `code_challenge` string, nullable
- `code_challenge_method` string, nullable

## Response `200`

Successful Response

- AuthorizeOut
  - `client` OAuthClientOut, required
    - `client_id` string, required
    - `name` string, required
    - `logo_url` string, nullable, required
  - `scopes` ScopeOut[], required
    - `scope` string, required
    - `title` string, required: عنوان فارسی برای صفحه‌ی اجازه.
    - `description` string, required
  - `redirect_uri` string, required
  - `state` string, nullable, required
  - `user` AuthorizeUserOut, required: Whose account the app is about to connect — shown on the consent card.
    - `id` integer, required
    - `phone_number` string, required
    - `display_name` string, nullable, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests

---

[API](https://skmtc.dev/barchin/apis/barchin-scraping-api.md) · [All operations](https://skmtc.dev/barchin/apis/barchin-scraping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/barchin/apis/barchin-scraping-api/revisions/fe97e4690cc3?raw)
