# Submit the consent decision
`POST https://tokens.livepush.io/oauth2/authorize`
Records the user's decision and redirects back to your app.

On approval the redirect carries `code` (valid for 10 minutes, single use) and your `state`. On refusal or any validation failure it carries `error` and `error_description` instead, and no code.
- **Tag:** Authentication
- **Operation ID:** `submitOAuth2Consent`
- **Authentication:** Bearer token required
- **Docs:** https://developers.livepush.io/authentication/submit-the-consent-decision/

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string | yes | Client ID issued by the developer console. |
| `redirect_uri` | string | yes | Must match the value used on the consent request. |
| `scope` | string | yes | The scopes the user was shown. |
| `state` | string | no | Echoed back on the redirect. |


### Request body

`application/json` (required)

- `session_id` (string) **required** — The sessionID from the consent screen.
- `is_rejected` (boolean) — true when the user refused. Accepted as a boolean or the string "true". A refusal redirects back with error=accessdenied.


```json
{
  "session_id": "Bk93jd0Ba",
  "is_rejected": false
}
```


### Example request

```bash
curl -X POST 'https://tokens.livepush.io/oauth2/authorize?client_id=%3Cclient_id%3E&redirect_uri=https%3A%2F%2Fyourapp.example.com%2Fcallback&scope=streams.read%2Cstreams.videos.read' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "session_id": "Bk93jd0Ba",
    "is_rejected": false
  }'
```


### Responses


#### 301 — Redirect to redirecturi carrying either code or error.


#### 401 — Response

