lnbits/extensions/streamalerts/views_api.py
async def api_get_access(service_id, request: Request):
    """Redirect to Streamlabs' Approve/Decline page for API access for Service
    with service_id
    """
    service = await get_service(service_id)
    if service:
        redirect_uri = await get_service_redirect_uri(request, service_id)
        params = {
            "response_type": "code",
            "client_id": service.client_id,
            "redirect_uri": redirect_uri,
            "scope": "donations.create",
            "state": service.state,
        }
        endpoint_url = "https://streamlabs.com/api/v1.0/authorize/?"
        querystring = "&".join([f"{key}={value}" for key, value in params.items()])
        redirect_url = endpoint_url + querystring
        return RedirectResponse(redirect_url)
    else:
        raise HTTPException(
            status_code=HTTPStatus.BAD_REQUEST, detail="Service does not exist!"
        )
Redirect to Streamlabs' Approve/Decline page for API access for Service
    with service_id
    
Redirect to Streamlabs' Approve/Decline page for API access for Service
with service_id
Redirect to Streamlabs ' Approve / Decline page for API access for Service with service_id
async def api_get_access(service_id, request: Request):
    service = await get_service(service_id)
    if service:
        redirect_uri = await get_service_redirect_uri(request, service_id)
        params = {
            "response_type": "code",
            "client_id": service.client_id,
            "redirect_uri": redirect_uri,
            "scope": "donations.create",
            "state": service.state,
        }
        endpoint_url = "https://streamlabs.com/api/v1.0/authorize/?"
        querystring = "&".join([f"{key}={value}" for key, value in params.items()])
        redirect_url = endpoint_url + querystring
        return RedirectResponse(redirect_url)
    else:
        raise HTTPException(
            status_code=HTTPStatus.BAD_REQUEST, detail="Service does not exist!"
        )
async def api_get_access ( service_id , request : Request ) : service = await get_service ( service_id ) if service : redirect_uri = await get_service_redirect_uri ( request , service_id ) params = { "response_type" : "code" , "client_id" : service . client_id , "redirect_uri" : redirect_uri , "scope" : "donations.create" , "state" : service . state , } endpoint_url = "https://streamlabs.com/api/v1.0/authorize/?" querystring = "&" . join ( [ f"{key}={value}" for key , value in params . items ( ) ] ) redirect_url = endpoint_url + querystring return RedirectResponse ( redirect_url ) else : raise HTTPException ( status_code = HTTPStatus . BAD_REQUEST , detail = "Service does not exist!" )
Redirect to Streamlabs' Approve/Decline page for API access for Service
with service_id
Redirect to Streamlabs ' Approve / Decline page for API access for Service with service_id
"""Redirect to Streamlabs' Approve/Decline page for API access for Service
    with service_id
    """
service_id
request
Request