Invalid JSON
Invalid JSON troubleshooting for PanelConfig API integrations.
Meaning
Invalid JSON usually means the request did not reach the JSON API path, PHP emitted a warning before JSON output, or a proxy/application error page was returned.
Checklist
- Call
/api/v1/me.phpwith the same token. - Confirm the exact route exists in
/api/v1/. - Use the file-based
.phppath unless your deployment has route rewriting. - Check whether the endpoint requires an admin-capable user.
- Check rate-limit behavior and reduce polling if needed.
- Review API request records and server/PHP logs.
Example
curl -i https://panel.example.com/api/v1/me.php \
-H "Authorization: Bearer pc_YOUR_TOKEN" \
-H "Accept: application/json"Recovery
- Do not retry writes blindly in future write endpoints.
- Rotate tokens if secret exposure is suspected.
- Use staging to reproduce integration failures.
- Escalate with timestamp, route, HTTP status, and response message.
Error Handling
flowchart TD
A[API Request] --> B{Token Valid}
B -- No --> C[401 Unauthorized]
B -- Yes --> D{Role Allowed}
D -- No --> E[403 Forbidden]
D -- Yes --> F{Rate Window OK}
F -- No --> G[429 Rate Limit]
F -- Yes --> H[Return JSON]