Get the consent screen
GET
https://tokens.livepush.io/oauth2/authorize
Base URL https://tokens.livepush.io — Authentication & OAuth 2.0
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.
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…
GET
https://tokens.livepush.io/oauth2/authorize
— This call only reads data.
Parameters
Query parameters
-
client_idstring requiredClient ID issued by the developer console. -
redirect_uristring requiredMust exactly match a redirect URI registered for the app.example: https://yourapp.example.com/callback -
response_typestring requiredMust becode.codeexample: code -
scopestring requiredRequested scopes, comma- or space-separated.example: streams.read,streams.videos.read -
statestringOpaque value echoed back on the redirect. Generate it randomly per attempt and verify it on return.
Code samples
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'
const response = await fetch('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', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
},
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
}
response = requests.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', headers=headers, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Consent screen data.
-
sessionIDstringConsent session handle. Post it back with the user's decision. Valid for 5 minutes. -
appobjectThe requesting application, as registered in the developer console.-
namestring -
avatarstring
-
-
scopeOAuth2ScopeDef[]The scopes being requested, one entry per scope.-
titlestring -
descriptionstringCurrently mirrorstitle. -
crucialbooleanMarks a scope the app cannot function without.
-
{
"sessionID": "Bk93jd0Ba",
"app": {
"name": "Your App",
"avatar": "string"
},
"scope": [
{
"title": "streams.read",
"description": "streams.read",
"crucial": false
}
]
}
No response body.