Fetch Profile Info
POST
https://api-v3.sweeppea.com/account/profile
Description
This endpoint allows you to fetch user profile information including personal and business data. Use this to retrieve complete user account information programmatically through the Sweeppea API.
Code Examples
curl -X POST "https://api-v3.sweeppea.com/account/profile" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
const response = await fetch('https://api-v3.sweeppea.com/account/profile', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://api-v3.sweeppea.com/account/profile"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.json())
Response
{
"Response": true,
"Data": {
"UserToken": "uuid-v4-string",
"Nickname": "string",
"Email": "string",
"UserType": 1,
"Status": true,
"CreationDate": "2024-01-01T00:00:00.000Z",
"LastLogin": "2024-01-01T00:00:00.000Z",
"IsShopifyAccount": false,
"ProfileData": {
"FullName": "string",
"MobilePhone": "string",
"Address": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"Country": "string",
"Avatar": "string",
"BirthDate": "2024-01-01T00:00:00.000Z"
}
},
"Telemetry": {
"DataConsumed": 0,
"APICalls": 142,
"MaxAPICalls": 500000
}
}
Error Responses
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
"Code": 401
}
{
"Response": false,
"Message": "Invalid API token. It does not match any account.",
"Code": 403
}
{
"Response": false,
"Message": "User Profile Not Found",
"Code": 404
}