curl -X GET 'https://api.weir.ai/user/profile' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"userId": "user_123456789",
"fullname": "John Doe",
"firstname": "John",
"lastname": "Doe",
"username": "johndoe123",
"email": "john.doe@example.com",
"bio": "Software engineer",
"location": "San Francisco, CA",
"avatar": "https://cdn.weir.ai/avatars/user_123456789.jpg",
"role": "Organization_Admin",
"organizationId": "org_123456789",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-22T15:30:00Z"
},
"message": "Profile retrieved successfully",
"status": "success"
}
Console APIs - Users
Get User Profile
Retrieve current user’s profile information
GET
/
user
/
profile
curl -X GET 'https://api.weir.ai/user/profile' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"userId": "user_123456789",
"fullname": "John Doe",
"firstname": "John",
"lastname": "Doe",
"username": "johndoe123",
"email": "john.doe@example.com",
"bio": "Software engineer",
"location": "San Francisco, CA",
"avatar": "https://cdn.weir.ai/avatars/user_123456789.jpg",
"role": "Organization_Admin",
"organizationId": "org_123456789",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-22T15:30:00Z"
},
"message": "Profile retrieved successfully",
"status": "success"
}
Get User Profile
Retrieve the authenticated user’s profile information.curl -X GET 'https://api.weir.ai/user/profile' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"userId": "user_123456789",
"fullname": "John Doe",
"firstname": "John",
"lastname": "Doe",
"username": "johndoe123",
"email": "john.doe@example.com",
"bio": "Software engineer",
"location": "San Francisco, CA",
"avatar": "https://cdn.weir.ai/avatars/user_123456789.jpg",
"role": "Organization_Admin",
"organizationId": "org_123456789",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-22T15:30:00Z"
},
"message": "Profile retrieved successfully",
"status": "success"
}
Response Fields
User profile data object.
Show Profile Properties
Show Profile Properties
Unique user identifier.
User’s full name.
First name.
Last name.
Username.
Email address.
User biography.
User location.
Avatar URL.
User role in organization.
Usage Examples
const getUserProfile = async (accessToken) => {
const response = await fetch('https://api.weir.ai/user/profile', {
headers: {
'Authorization': `Bearer ${accessToken}`,
'x-source': 'console'
}
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
Was this page helpful?
⌘I