curl --request POST \
--url https://pria.praxislxp.com/api/user/refresh/profile \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"brandingId": "<string>"
}
'import requests
url = "https://pria.praxislxp.com/api/user/refresh/profile"
payload = { "brandingId": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({brandingId: '<string>'})
};
fetch('https://pria.praxislxp.com/api/user/refresh/profile', 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/user/refresh/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'brandingId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/user/refresh/profile"
payload := strings.NewReader("{\n \"brandingId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/user/refresh/profile")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brandingId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/refresh/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brandingId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"token": "<string>",
"profile": {
"_id": "<string>",
"email": "<string>",
"fname": "<string>",
"lname": "<string>",
"picture": "<string>",
"accountType": "user",
"credits": 123,
"creditsUsed": 123,
"plan": "<string>",
"status": "<string>",
"customerId": "<string>",
"institution": {},
"remember_history_count": 123,
"browser_voice": "<string>",
"browser_voices": {},
"rt_voice": "<string>",
"use_location": true,
"use_stt": true,
"pin_ui": true,
"showSideBar": true,
"galleryAsGrid": true,
"ragOnlySearch": true,
"ragIgnore": true,
"ragKagMode": true,
"dark_mode": true,
"mustChangePassword": true,
"updatePasswordOnSSO": true,
"resetCodeId": "<string>",
"referralId": "<string>",
"trial_end": "2023-11-07T05:31:56Z",
"trial_used": true,
"current_period_end": "2023-11-07T05:31:56Z",
"cancel_at_period_end": true,
"lxp_user_id": "<string>",
"lxp_partner_name": "<string>",
"lxp_role_name": "<string>",
"googleLoginToken": {},
"googleOAuthScopes": [
"<string>"
],
"institutionGoogleOAuthEnabled": true,
"institutionGoogleOAuthScopes": [
"<string>"
],
"institutionGoogleWorkspaceEnabled": true,
"institutionGoogleUseInstitutionAccount": true
},
"brandingSwitch": {
"publicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"result": "switched",
"reason": "<string>"
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Authentication required"
}Refresh user profile data
Retrieves the current user’s full profile including populated institution, account, and Google OAuth status. Proactively refreshes expired Google tokens when a refresh_token is available. Returns a fresh JWT token (sliding session) — store this token to extend the session without re-authentication. Accepts an optional branded-link hint (see request body).
curl --request POST \
--url https://pria.praxislxp.com/api/user/refresh/profile \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"brandingId": "<string>"
}
'import requests
url = "https://pria.praxislxp.com/api/user/refresh/profile"
payload = { "brandingId": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({brandingId: '<string>'})
};
fetch('https://pria.praxislxp.com/api/user/refresh/profile', 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/user/refresh/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'brandingId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/user/refresh/profile"
payload := strings.NewReader("{\n \"brandingId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/user/refresh/profile")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brandingId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/refresh/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brandingId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"token": "<string>",
"profile": {
"_id": "<string>",
"email": "<string>",
"fname": "<string>",
"lname": "<string>",
"picture": "<string>",
"accountType": "user",
"credits": 123,
"creditsUsed": 123,
"plan": "<string>",
"status": "<string>",
"customerId": "<string>",
"institution": {},
"remember_history_count": 123,
"browser_voice": "<string>",
"browser_voices": {},
"rt_voice": "<string>",
"use_location": true,
"use_stt": true,
"pin_ui": true,
"showSideBar": true,
"galleryAsGrid": true,
"ragOnlySearch": true,
"ragIgnore": true,
"ragKagMode": true,
"dark_mode": true,
"mustChangePassword": true,
"updatePasswordOnSSO": true,
"resetCodeId": "<string>",
"referralId": "<string>",
"trial_end": "2023-11-07T05:31:56Z",
"trial_used": true,
"current_period_end": "2023-11-07T05:31:56Z",
"cancel_at_period_end": true,
"lxp_user_id": "<string>",
"lxp_partner_name": "<string>",
"lxp_role_name": "<string>",
"googleLoginToken": {},
"googleOAuthScopes": [
"<string>"
],
"institutionGoogleOAuthEnabled": true,
"institutionGoogleOAuthScopes": [
"<string>"
],
"institutionGoogleWorkspaceEnabled": true,
"institutionGoogleUseInstitutionAccount": true
},
"brandingSwitch": {
"publicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"result": "switched",
"reason": "<string>"
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Authentication required"
}Authorizations
JWT token passed in x-access-token header
Body
Optional branded-link hint — the institution publicId from a /login?brandingId= link opened while this session was still valid. When the caller is an active member of that twin (or a platform operator) and the twin's account is active, the active institution is switched before the profile is built; the outcome is reported in brandingSwitch. Never grants access.
Response
Profile refreshed successfully
Whether the operation was successful
Fresh JWT token (sliding session). Each profile refresh extends the session by the configured expiration period (default 6 hours). Store this token and use it for subsequent API requests.
Full user profile object (User model fields merged with populated institution, plus Google OAuth flags). Sensitive fields (password, permissions, __v, created) are stripped.
Show child attributes
Show child attributes
Outcome of a branded-link switch attempt. Present only when the request carried a brandingId (an institution publicId from a /login?brandingId= link). The hint never grants access: switched requires an active membership on the twin (or platform-operator status) and an active parent account. Clients clear the stored hint on switched/already and show the no-access notice on refused.
Show child attributes
Show child attributes
Was this page helpful?