取得會員分析圖表
Retrieve time-series client statistics data with date and count information.
Default time range: Last 7 days if startTime and endTime are not provided
Time range limitations:
Maximum time range is limited to 1 year (365 days)
If the time range exceeds 1 year, the system will automatically adjust the startTime to be 365 days before the endTime
The endTime will remain unchanged to preserve the user's specified end date
Platform filtering:
If platform is not specified, returns data for all platforms
If platform is specified, returns data only for that platform
Supported platforms: line, facebook, instagram, liveChat, whatsapp
Response format: Arrays of objects with date and count properties
The bot ID for the API request
Secret key for API authentication
your_secret_key_here
Platform type for filtering (optional, if not provided returns all platforms)
line
Possible values: Start date for statistics range (optional, defaults to 7 days ago if not provided). Note - If the time range exceeds 365 days, startTime will be automatically adjusted to be 365 days before endTime.
2025-01-01
End date for statistics range (optional, defaults to today if not provided). This date will be preserved even if the time range exceeds 365 days.
2025-01-07
Statistics type
follower
Example: follower
Possible values: Client statistics data retrieved successfully
JWT token is invalid or expired
Permission denied - insufficient access rights
OpenAPI configuration not found
Rate limit exceeded
Internal server error
POST /api/openapi/clients/statistics?botId=text HTTP/1.1
Host: mantago.cc
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 117
{
"secret": "your_secret_key_here",
"platform": "line",
"startTime": "2025-01-01",
"endTime": "2025-01-07",
"type": "follower"
}
{
"success": true,
"message": "Get client statistics successfully",
"clientStatistics": {
"lineFollowers": [
{
"date": "2025-01-10",
"count": 1250
},
{
"date": "2025-01-11",
"count": 1255
},
{
"date": "2025-01-12",
"count": 1260
}
],
"fbFollowers": [
{
"date": "2025-01-10",
"count": 920
},
{
"date": "2025-01-11",
"count": 925
},
{
"date": "2025-01-12",
"count": 930
}
],
"igFollowers": [
{
"date": "2025-01-10",
"count": 1100
},
{
"date": "2025-01-11",
"count": 1110
},
{
"date": "2025-01-12",
"count": 1115
}
],
"liveChatFollowers": [
{
"date": "2025-01-10",
"count": 180
},
{
"date": "2025-01-11",
"count": 182
},
{
"date": "2025-01-12",
"count": 185
}
],
"whatsappFollowers": [
{
"date": "2025-01-10",
"count": 450
},
{
"date": "2025-01-11",
"count": 455
},
{
"date": "2025-01-12",
"count": 460
}
],
"totalFollowers": [
{
"date": "2025-01-10",
"count": 3900
},
{
"date": "2025-01-11",
"count": 3927
},
{
"date": "2025-01-12",
"count": 3950
}
]
}
}
Last updated