Get current user.
curl --request GET \
--url https://api.gleap.io/v3/users/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gleap.io/v3/users/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gleap.io/v3/users/me', 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.gleap.io/v3/users/me",
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://api.gleap.io/v3/users/me"
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://api.gleap.io/v3/users/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/users/me")
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{
"createdAt": "<string>",
"updatedAt": "<string>",
"notificationPreferences": {
"all-ticket-messages": {
"push": true,
"inApp": true,
"email": true
},
"all-sla-breached": {
"push": true,
"inApp": true,
"email": true
},
"personal-ticket-messages": {
"push": true,
"inApp": true,
"email": true
},
"all-created-tickets": {
"push": true,
"inApp": true,
"email": true
},
"personal-assignment": {
"push": true,
"inApp": true,
"email": true
},
"personal-mention": {
"push": true,
"inApp": true,
"email": true
},
"personal-reaction": {
"push": true,
"inApp": true,
"email": true
},
"personal-thread-reply": {
"push": true,
"inApp": true,
"email": true
},
"team-ticket-messages": {
"push": true,
"inApp": true,
"email": true
},
"team-ticket-assignment": {
"push": true,
"inApp": true,
"email": true
}
},
"_id": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"hidden": true,
"email": "<string>",
"code": "<string>",
"phone": "<string>",
"identityProvider": {
"providerId": "<string>",
"userId": "<string>"
},
"firstName": "<string>",
"lastName": "<string>",
"profileImageUrl": "<string>",
"gameUsername": "<string>",
"lastSeen": "2023-11-07T05:31:56Z",
"lastAutoAssign": "2023-11-07T05:31:56Z",
"available": true,
"unavailableProjects": [
"<string>"
],
"services": {
"default": "<unknown>"
},
"serviceAccountApiToken": "<string>",
"confirmed": true,
"referral": "<string>",
"codeCreatedAt": "2023-11-07T05:31:56Z",
"otp": "<string>",
"otpCreatedAt": "2023-11-07T05:31:56Z",
"userRole": "<string>",
"jobTitle": "<string>",
"department": "<string>",
"calendarLink": "<string>",
"socialLink": "<string>",
"otherLink": "<string>",
"knewGleapFrom": "<string>",
"userUsage": "<string>",
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"utm_campaign": "<string>",
"gaClientId": "<string>",
"gaSessionId": "<string>",
"marketingTracking": {
"generateLeadTrackedAt": "2023-11-07T05:31:56Z",
"signupTrackedAt": "2023-11-07T05:31:56Z"
},
"completedOnboarding": true,
"onboardingFlow": "<string>",
"mastercardUser": true,
"fcmTokens": [
"<string>"
],
"twoFactorAuthentication": {
"currentWebAuthnChallenge": "<string>",
"methods": {
"webAuthn": [
{
"counter": 123,
"publicKey": "<string>",
"credentialID": "<string>",
"name": "<string>"
}
]
},
"isEnabled": true
},
"notificationSettings": {
"preventNotificationsWhereICreator": true,
"directlySendNotifications": true,
"sendEmailOnlyWhenOffline": true
}
}User
Get current user.
Get the authenticated user. Credentials and internal fields (password, code,
serviceAccountApiToken, marketingTracking, WebAuthn key material) are never included in the
response.
GET
/
users
/
me
Get current user.
curl --request GET \
--url https://api.gleap.io/v3/users/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gleap.io/v3/users/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gleap.io/v3/users/me', 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.gleap.io/v3/users/me",
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://api.gleap.io/v3/users/me"
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://api.gleap.io/v3/users/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/users/me")
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{
"createdAt": "<string>",
"updatedAt": "<string>",
"notificationPreferences": {
"all-ticket-messages": {
"push": true,
"inApp": true,
"email": true
},
"all-sla-breached": {
"push": true,
"inApp": true,
"email": true
},
"personal-ticket-messages": {
"push": true,
"inApp": true,
"email": true
},
"all-created-tickets": {
"push": true,
"inApp": true,
"email": true
},
"personal-assignment": {
"push": true,
"inApp": true,
"email": true
},
"personal-mention": {
"push": true,
"inApp": true,
"email": true
},
"personal-reaction": {
"push": true,
"inApp": true,
"email": true
},
"personal-thread-reply": {
"push": true,
"inApp": true,
"email": true
},
"team-ticket-messages": {
"push": true,
"inApp": true,
"email": true
},
"team-ticket-assignment": {
"push": true,
"inApp": true,
"email": true
}
},
"_id": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"hidden": true,
"email": "<string>",
"code": "<string>",
"phone": "<string>",
"identityProvider": {
"providerId": "<string>",
"userId": "<string>"
},
"firstName": "<string>",
"lastName": "<string>",
"profileImageUrl": "<string>",
"gameUsername": "<string>",
"lastSeen": "2023-11-07T05:31:56Z",
"lastAutoAssign": "2023-11-07T05:31:56Z",
"available": true,
"unavailableProjects": [
"<string>"
],
"services": {
"default": "<unknown>"
},
"serviceAccountApiToken": "<string>",
"confirmed": true,
"referral": "<string>",
"codeCreatedAt": "2023-11-07T05:31:56Z",
"otp": "<string>",
"otpCreatedAt": "2023-11-07T05:31:56Z",
"userRole": "<string>",
"jobTitle": "<string>",
"department": "<string>",
"calendarLink": "<string>",
"socialLink": "<string>",
"otherLink": "<string>",
"knewGleapFrom": "<string>",
"userUsage": "<string>",
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"utm_campaign": "<string>",
"gaClientId": "<string>",
"gaSessionId": "<string>",
"marketingTracking": {
"generateLeadTrackedAt": "2023-11-07T05:31:56Z",
"signupTrackedAt": "2023-11-07T05:31:56Z"
},
"completedOnboarding": true,
"onboardingFlow": "<string>",
"mastercardUser": true,
"fcmTokens": [
"<string>"
],
"twoFactorAuthentication": {
"currentWebAuthnChallenge": "<string>",
"methods": {
"webAuthn": [
{
"counter": 123,
"publicKey": "<string>",
"credentialID": "<string>",
"name": "<string>"
}
]
},
"isEnabled": true
},
"notificationSettings": {
"preventNotificationsWhereICreator": true,
"directlySendNotifications": true,
"sendEmailOnlyWhenOffline": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Ok
Generic types for Document:
- T - the type of _id
- TQueryHelpers - Object with any helpers that should be mixed into the Query type
- DocType - the type of the actual Document created
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
default, sso, service_account Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I