Get User Profile
curl --request GET \
--url https://api.example.com/user/profile \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/user/profile"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/user/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://api.example.com/user/profile",
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: <authorization>"
],
]);
$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://api.example.com/user/profile"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/user/profile")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/user/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"name": "Dr. John Doe",
"email": "doctor@example.com",
"firstName": "John",
"lastName": "Doe",
"title": "Dr.",
"specialty": "Cardiology",
"subscriptionType": "individual",
"subscriptionActive": true,
"subscriptionExpiry": "2026-12-31T23:59:59.000Z",
"teamId": null,
"teamRole": null,
"hasTeamSubscription": false
}
}
User
Get User Profile
Retrieve the authenticated user’s profile
GET
/
user
/
profile
Get User Profile
curl --request GET \
--url https://api.example.com/user/profile \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/user/profile"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/user/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://api.example.com/user/profile",
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: <authorization>"
],
]);
$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://api.example.com/user/profile"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/user/profile")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/user/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"name": "Dr. John Doe",
"email": "doctor@example.com",
"firstName": "John",
"lastName": "Doe",
"title": "Dr.",
"specialty": "Cardiology",
"subscriptionType": "individual",
"subscriptionActive": true,
"subscriptionExpiry": "2026-12-31T23:59:59.000Z",
"teamId": null,
"teamRole": null,
"hasTeamSubscription": false
}
}
Overview
Returns the profile of the authenticated user. The user is identified entirely from the JWT — there is no user-id parameter, and you can only retrieve your own profile.Authentication
Response
true on success.The user’s profile.
Show data
Show data
Full display name (title + first + last).
Email address.
First name.
Last name.
Medical title.
Medical specialty.
Subscription type (e.g.
individual, team).Whether the subscription/trial is currently active.
Subscription/trial expiry (ISO 8601).
Team id, or
null for individual accounts.Role within the team, or
null.Whether the account is covered by a team subscription.
Example Request
curl -X GET https://app.medisync.me/api/user/profile \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
const response = await fetch('https://app.medisync.me/api/user/profile', {
headers: { 'Authorization': `Bearer ${token}` }
});
const data = await response.json();
Example Response
{
"success": true,
"data": {
"name": "Dr. John Doe",
"email": "doctor@example.com",
"firstName": "John",
"lastName": "Doe",
"title": "Dr.",
"specialty": "Cardiology",
"subscriptionType": "individual",
"subscriptionActive": true,
"subscriptionExpiry": "2026-12-31T23:59:59.000Z",
"teamId": null,
"teamRole": null,
"hasTeamSubscription": false
}
}
Error Responses
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Session ended on this device because you signed in elsewhere.",
"code": "SESSION_REVOKED"
}
{
"success": false,
"error": "Benutzer nicht gefunden"
}
Next Steps
Authentication
How tokens and authorization work.
Appointments
List the authenticated doctor’s appointments.
⌘I