GET
/{whatsappSession}/session-logs
Retrieves a paginated list of session activity logs.
Get Session Logs
This endpoint fetches a paginated history of significant events for the specified WhatsApp session. These logs are crucial for debugging connection issues, tracking the session's lifecycle (e.g., when it connected, disconnected, or received a QR code), and general auditing.
The response is a standard paginated object, which you can navigate using the page
and per_page
query parameters.
Parameters
Name | Type | Required | Description |
---|---|---|---|
whatsappSession | integer | Yes | The unique identifier of the WhatsApp session. |
page | integer | No | The page number to retrieve. Defaults to 1. |
per_page | integer | No | The number of items to retrieve per page. Defaults to 10. |
Code Examples
curl -X GET "https://www.wasenderapi.com/api/my-session-123/session-logs?page=1&per_page=15"
-H "Authorization: Bearer YOUR_API_KEY"
Response Examples
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 201,
"whatsapp_session_id": 1,
"event_type": "session_restarted",
"status":"connected",
"occurred_at": "2025-09-23T12:00:00.000000Z"
},
{
"id": 200,
"whatsapp_session_id": 1,
"event_type": "status_change",
"status": "need_scan",
"occurred_at": "2025-09-23T11:59:30.000000Z"
}
],
"first_page_url": "/api/my-session-123/session-logs?page=1",
"from": 1,
"last_page": 3,
"last_page_url": "/api/my-session-123/session-logs?page=3",
"next_page_url": "/api/my-session-123/session-logs?page=2",
"path": "/api/my-session-123/session-logs",
"per_page": 2,
"prev_page_url": null,
"to": 2,
"total": 6
}
}