Get authenticated user
curl --request GET \
--url https://store.salesive.com/api/v1/auth/meimport requests
url = "https://store.salesive.com/api/v1/auth/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://store.salesive.com/api/v1/auth/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://store.salesive.com/api/v1/auth/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://store.salesive.com/api/v1/auth/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://store.salesive.com/api/v1/auth/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/auth/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{
"status": 200,
"success": true,
"message": "Authenticated user retrieved successfully",
"data": {
"user": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>"
},
"token": "<string>",
"tokenExpiresAt": "2023-11-07T05:31:56Z"
}
}Authentication
Get authenticated user
Validate a shopper token and retrieve the current session profile.
GET
/
auth
/
me
Get authenticated user
curl --request GET \
--url https://store.salesive.com/api/v1/auth/meimport requests
url = "https://store.salesive.com/api/v1/auth/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://store.salesive.com/api/v1/auth/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://store.salesive.com/api/v1/auth/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://store.salesive.com/api/v1/auth/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://store.salesive.com/api/v1/auth/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/auth/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{
"status": 200,
"success": true,
"message": "Authenticated user retrieved successfully",
"data": {
"user": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>"
},
"token": "<string>",
"tokenExpiresAt": "2023-11-07T05:31:56Z"
}
}Request
GET /auth/me
Authorization: Bearer {token}
x-shop-id: {shopId}
Headers
| Header | Type | Description |
|---|---|---|
Authorization | string | Provide the shopper token in the format Bearer <jwt>. |
x-shop-id | string | Shop identifier to associate the user with your store. |
Successful response
{
"status": 200,
"success": true,
"message": "Authenticated user retrieved successfully",
"data": {
"user": {
"_id": "669d5dcf3cc9c8596ec0f302",
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "08099887766",
"role": "user",
"shopRole": null,
"stores": [],
"avatar": "https://cdn.salesive.com/u/avatar.png",
"authMethod": "google",
"balance": 0,
"deleted": false,
"disabled": false,
"createdAt": "2025-02-11T09:15:22.293Z",
"updatedAt": "2025-11-12T18:04:55.121Z"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"tokenExpiresAt": "2026-07-09T08:43:17.000Z"
}
}
You confirm the token is still valid when you receive the shopper profile
and the
tokenExpiresAt timestamp.Error response
{
"status": 401,
"success": false,
"message": "Authentication required",
"data": {}
}
A 401 response means the token is missing, expired, or revoked. Prompt the
shopper to re-authenticate before retrying.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Was this page helpful?
⌘I

