curl -X GET 'https://api.weir.ai/admin/members' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"admins": [
{
"adminId": "admin_123456789",
"fullname": "Admin User",
"email": "[email protected]",
"role": "Super_Admin",
"status": "active",
"createdAt": "2024-01-01T00:00:00Z",
"lastLogin": "2024-01-22T14:30:00Z"
}
],
"total": 1
},
"message": "Admin members retrieved successfully",
"status": "success"
}
Retrieve all admin users
curl -X GET 'https://api.weir.ai/admin/members' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"admins": [
{
"adminId": "admin_123456789",
"fullname": "Admin User",
"email": "[email protected]",
"role": "Super_Admin",
"status": "active",
"createdAt": "2024-01-01T00:00:00Z",
"lastLogin": "2024-01-22T14:30:00Z"
}
],
"total": 1
},
"message": "Admin members retrieved successfully",
"status": "success"
}
curl -X GET 'https://api.weir.ai/admin/members' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"admins": [
{
"adminId": "admin_123456789",
"fullname": "Admin User",
"email": "[email protected]",
"role": "Super_Admin",
"status": "active",
"createdAt": "2024-01-01T00:00:00Z",
"lastLogin": "2024-01-22T14:30:00Z"
}
],
"total": 1
},
"message": "Admin members retrieved successfully",
"status": "success"
}
const getAdminMembers = async (accessToken) => {
const response = await fetch('https://api.weir.ai/admin/members', {
headers: { 'Authorization': `Bearer ${accessToken}` }
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
Was this page helpful?