curl --request GET \
--url https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate \
--header 'Authorization: Bearer <token>'import requests
url = "https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate"
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/{institutionId}/validate', 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/{institutionId}/validate",
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/{institutionId}/validate"
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/{institutionId}/validate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate")
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{
"valid": true,
"cleared": true,
"retryable": true,
"message": "No Google tokens configured",
"error": "<string>"
}{
"success": false,
"message": "Not authorized"
}{
"success": false,
"message": "Institution not found"
}{
"success": false,
"message": "Validation request failed"
}Validate an institution's stored Google token
Probes Google’s userinfo endpoint with the institution’s stored
cloudServices.google.googleLoginToken to check whether it is still accepted.
Expired tokens are refreshed before probing; a 401 can trigger at most one
refresh and retry. Transient refresh/probe failures return valid: false, retryable: true and preserve the connection, including a 401 after refresh.
Only a token-endpoint invalid_grant, or a 401 without a refresh token,
clears cloudServices.google ($unset) and reports valid: false, cleared: true.
The caller must hold institutions.edit on the target institution.
curl --request GET \
--url https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate \
--header 'Authorization: Bearer <token>'import requests
url = "https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate"
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/{institutionId}/validate', 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/{institutionId}/validate",
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/{institutionId}/validate"
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/{institutionId}/validate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate")
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{
"valid": true,
"cleared": true,
"retryable": true,
"message": "No Google tokens configured",
"error": "<string>"
}{
"success": false,
"message": "Not authorized"
}{
"success": false,
"message": "Institution not found"
}{
"success": false,
"message": "Validation request failed"
}Authorizations
JWT token passed in authorization header
Path Parameters
ObjectId of the institution whose token to validate.
Response
Validation completed. Inspect valid for the outcome.
true
True after clearing a confirmed invalid_grant or a 401 credential with no refresh token.
Validation failed but the recoverable connection was preserved. Retry later.
Set when no Google token is configured for the institution.
"No Google tokens configured"
Set on validation failure (passes through Google's error).
Was this page helpful?