Submit the consent decision
POST
https://tokens.livepush.io/oauth2/authorize
Base URL https://tokens.livepush.io — Authentication & OAuth 2.0
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.
Authorization
Send a valid access token in the Authorization header.
sessionCookie— apiKey — srid Browser session cookie set byPOST /auth/signin.HttpOnly, 48-hour lifetime, scoped to the Livepush cookie domain. Used only by the auth service — the resource APIs accept bearer tokens and nothing else.
Authorization: Bearer YOUR_API_TOKEN
Try it
Loading the request builder…
POST
https://tokens.livepush.io/oauth2/authorize
— This call changes live data on your account.
Parameters
Query parameters
-
client_idstring requiredClient ID issued by the developer console. -
redirect_uristring requiredMust match the value used on the consent request.example: https://yourapp.example.com/callback -
scopestring requiredThe scopes the user was shown.example: streams.read,streams.videos.read -
statestringEchoed back on the redirect.
Request body
-
session_idstring requiredThesessionIDfrom the consent screen. -
is_rejectedbooleantruewhen the user refused. Accepted as a boolean or the string"true". A refusal redirects back witherror=access_denied.
{
"session_id": "Bk93jd0Ba",
"is_rejected": false
}
Code samples
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
}'
const response = await fetch('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', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"session_id": "Bk93jd0Ba",
"is_rejected": false
}),
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
}
payload = {
"session_id": "Bk93jd0Ba",
"is_rejected": False
}
response = requests.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', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Redirect to redirect_uri carrying either code or error.
Headers
LocationstringYour redirect URI withcodeandstate, orerroranderror_description, appended.
No response body.