Get Current User
curl --request GET \
--url https://api.example.com/meimport requests
url = "https://api.example.com/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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.example.com/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/me"
req, _ := http.NewRequest("GET", url, nil)
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/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"is_active": true,
"is_verified": true
}API Reference
Get Current User
Retrieve the profile of the authenticated user
GET
/
me
Get Current User
curl --request GET \
--url https://api.example.com/meimport requests
url = "https://api.example.com/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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.example.com/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/me"
req, _ := http.NewRequest("GET", url, nil)
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/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"is_active": true,
"is_verified": true
}Authentication
This endpoint requires an API token passed as a Bearer token in theAuthorization header.
Authorization: Bearer YOUR_API_TOKEN
Request
curl -X GET "https://app.shipstar.ai/api/v1/me" \
-H "Authorization: Bearer YOUR_API_TOKEN"
const response = await fetch('https://app.shipstar.ai/api/v1/me', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});
const user = await response.json();
import requests
response = requests.get(
'https://app.shipstar.ai/api/v1/me',
headers={'Authorization': 'Bearer YOUR_API_TOKEN'}
)
user = response.json()
Response
string
required
The user’s unique identifier (UUID)
string
required
The user’s email address
string
The user’s first name
string
The user’s last name
boolean
required
Whether the user account is active
boolean
required
Whether the user’s email has been verified
Example Response
200
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "[email protected]",
"first_name": "Jane",
"last_name": "Doe",
"is_active": true,
"is_verified": true
}
Errors
| Status | Description |
|---|---|
| 401 | Invalid or expired API token |
Was this page helpful?
⌘I