# Get the consent screen
`GET https://tokens.livepush.io/oauth2/authorize`
Starts the authorization-code flow and returns the data needed to render a consent screen. **Unlike most OAuth servers this returns JSON rather than an HTML page** — you build the consent UI and post the user's decision back.

The user must already have a Livepush session; the request is authenticated by the `srid` cookie, not by a bearer token. The `sessionID` in the response is valid for 5 minutes.
- **Tag:** Authentication
- **Operation ID:** `getOAuth2Consent`
- **Authentication:** Bearer token required
- **Docs:** https://developers.livepush.io/authentication/get-the-consent-screen/

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string | yes | Client ID issued by the developer console. |
| `redirect_uri` | string | yes | Must exactly match a redirect URI registered for the app. |
| `response_type` | string | yes | Must be code. |
| `scope` | string | yes | Requested scopes, comma- or space-separated. |
| `state` | string | no | Opaque value echoed back on the redirect. Generate it randomly per attempt and verify it on return. |


### Example request

```bash
curl -X GET 'https://tokens.livepush.io/oauth2/authorize?client_id=%3Cclient_id%3E&redirect_uri=https%3A%2F%2Fyourapp.example.com%2Fcallback&response_type=code&scope=streams.read%2Cstreams.videos.read' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```


### Responses


#### 200 — Consent screen data.

- `sessionID` (string) — Consent session handle. Post it back with the user's decision. Valid for 5 minutes.
- `app` (object) — The requesting application, as registered in the developer console.
  - `name` (string)
  - `avatar` (string)
- `scope` (OAuth2ScopeDef[]) — The scopes being requested, one entry per scope.
  - `title` (string)
  - `description` (string) — Currently mirrors title.
  - `crucial` (boolean) — Marks a scope the app cannot function without.


```json
{
  "sessionID": "Bk93jd0Ba",
  "app": {
    "name": "Your App",
    "avatar": "string"
  },
  "scope": [
    {
      "title": "streams.read",
      "description": "streams.read",
      "crucial": false
    }
  ]
}
```


#### 401 — Response

