curl --request GET \
--url https://pria.praxislxp.com/api/auth/google/institution/authorize \
--header 'Authorization: Bearer <token>'import requests
url = "https://pria.praxislxp.com/api/auth/google/institution/authorize"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pria.praxislxp.com/api/auth/google/institution/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pria.praxislxp.com/api/auth/google/institution/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/auth/google/institution/authorize"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pria.praxislxp.com/api/auth/google/institution/authorize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/auth/google/institution/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "Institution ID required"
}{
"message": "Not authorized to configure this institution"
}{
"error": "Institution not found"
}Start the Google OAuth flow for an institution-level token
Begins an institution-scoped Google OAuth 2.0 authorization-code flow. The
resulting token is later stored on Institution.cloudServices.google.googleLoginToken
and is used as the shared institution credential for downstream Google API
calls performed on behalf of any member of that institution.
The caller MUST hold institutions.edit on the target institution (checked via
checkRAPForUI). The captured session state records the connecting user’s _id
(connectedByUserId) so the callback can attribute the connection.
curl --request GET \
--url https://pria.praxislxp.com/api/auth/google/institution/authorize \
--header 'Authorization: Bearer <token>'import requests
url = "https://pria.praxislxp.com/api/auth/google/institution/authorize"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pria.praxislxp.com/api/auth/google/institution/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pria.praxislxp.com/api/auth/google/institution/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/auth/google/institution/authorize"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pria.praxislxp.com/api/auth/google/institution/authorize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/auth/google/institution/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "Institution ID required"
}{
"message": "Not authorized to configure this institution"
}{
"error": "Institution not found"
}Authorizations
JWT token passed in authorization header
Query Parameters
ObjectId of the institution to attach the token to.
Comma-separated Google service names. Resolved via
GoogleServicesConfig.buildScopes.
Response
Redirect to Google's OAuth consent screen. On error during initiation
(configuration / lookup failure) the user is redirected to
${PRIA_URL}/oauth/success?error=auth_initiation_failed instead.
Was this page helpful?