curl -X GET 'https://api.weir.ai/org/clients' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"clients": [
{
"clientId": "cli_123456789",
"name": "Production API Client",
"environment": "production",
"credentials": {
"clientId": "V2ndYYV7PMQVjqyTsk2QkokCv"
},
"createdAt": "2024-01-15T10:30:00Z",
"lastUsed": "2024-01-22T14:20:00Z",
"status": "active"
}
]
},
"message": "Clients retrieved successfully",
"status": "success"
}
Retrieve all API clients in your organization
curl -X GET 'https://api.weir.ai/org/clients' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"clients": [
{
"clientId": "cli_123456789",
"name": "Production API Client",
"environment": "production",
"credentials": {
"clientId": "V2ndYYV7PMQVjqyTsk2QkokCv"
},
"createdAt": "2024-01-15T10:30:00Z",
"lastUsed": "2024-01-22T14:20:00Z",
"status": "active"
}
]
},
"message": "Clients retrieved successfully",
"status": "success"
}
curl -X GET 'https://api.weir.ai/org/clients' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"clients": [
{
"clientId": "cli_123456789",
"name": "Production API Client",
"environment": "production",
"credentials": {
"clientId": "V2ndYYV7PMQVjqyTsk2QkokCv"
},
"createdAt": "2024-01-15T10:30:00Z",
"lastUsed": "2024-01-22T14:20:00Z",
"status": "active"
}
]
},
"message": "Clients retrieved successfully",
"status": "success"
}
Show Client Properties
const getClients = async (accessToken) => {
const response = await fetch('https://api.weir.ai/org/clients', {
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?