Skip to content

Logs (Development Only)

Endpoints for accessing logs in development environments.

Get SMS Verifications

Retrieve SMS verification logs for debugging.

Endpoint

GET /api/logs/sms

Availability

  • Only available in: local, testing, staging environments
  • Returns 404 in production

Query Parameters

  • phone (optional) - Filter by phone number
  • date (optional) - Filter by date (YYYY-MM-DD)
  • status (optional) - Filter by status (sent, failed)

Response

json
{
  "data": [
    {
      "id": 1,
      "phone": "+1234567890",
      "code": "123456",
      "status": "sent",
      "provider": "twilio",
      "created_at": "2024-01-15T10:00:00Z",
      "expires_at": "2024-01-15T10:05:00Z",
      "attempts": 1
    },
    {
      "id": 2,
      "phone": "+0987654321",
      "code": "654321",
      "status": "failed",
      "provider": "twilio",
      "error": "Invalid phone number",
      "created_at": "2024-01-15T09:00:00Z",
      "attempts": 3
    }
  ]
}

Notes

  • Used for debugging SMS delivery issues
  • Shows verification codes in non-production environments
  • Helps troubleshoot authentication problems