curl -X GET 'https://api.weir.ai/org/platforms' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"platforms": [
{
"platformId": "platform_123456789",
"name": "My Platform",
"type": "Forum/Community",
"domain": "myplatform.com",
"status": "verified",
"teamId": "team_123456789",
"createdAt": "2024-01-15T10:30:00Z"
}
]
},
"message": "Platforms retrieved successfully",
"status": "success"
}
Console APIs - Platforms
Get Platforms
Retrieve all platforms in your organization
GET
/
org
/
platforms
curl -X GET 'https://api.weir.ai/org/platforms' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"platforms": [
{
"platformId": "platform_123456789",
"name": "My Platform",
"type": "Forum/Community",
"domain": "myplatform.com",
"status": "verified",
"teamId": "team_123456789",
"createdAt": "2024-01-15T10:30:00Z"
}
]
},
"message": "Platforms retrieved successfully",
"status": "success"
}
Get Platforms
Retrieve a list of all platforms associated with your organization.curl -X GET 'https://api.weir.ai/org/platforms' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"platforms": [
{
"platformId": "platform_123456789",
"name": "My Platform",
"type": "Forum/Community",
"domain": "myplatform.com",
"status": "verified",
"teamId": "team_123456789",
"createdAt": "2024-01-15T10:30:00Z"
}
]
},
"message": "Platforms retrieved successfully",
"status": "success"
}
Response Fields
array
required
Array of platform objects.
Show Platform Properties
Show Platform Properties
Usage Examples
const getPlatforms = async (accessToken) => {
const response = await fetch('https://api.weir.ai/org/platforms', {
headers: {
'Authorization': `Bearer ${accessToken}`,
'x-source': 'console'
}
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
import requests
def get_platforms(access_token):
response = requests.get(
'https://api.weir.ai/org/platforms',
headers={
'Authorization': f'Bearer {access_token}',
'x-source': 'console'
}
)
response.raise_for_status()
return response.json()
function getPlatforms($accessToken) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.weir.ai/org/platforms');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $accessToken,
'x-source: console'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
Was this page helpful?