API Troubleshooting
Use this checklist when API requests fail.
Quick Checklist
- Confirm global API access is enabled:
enable_api_access. - Confirm model-level API switch is enabled (example:
enable_api_post,enable_api_website). - Confirm endpoint-level switch is enabled (example:
wncms_api_post_index). - Verify
api_tokenexists and belongs to an active user. - Verify request method and endpoint path are correct.
- Check payload field names and data types.
Common Cases
401: Missing or invalid token.403: API switch is disabled.404: Wrong route path or wrong base domain.422: Validation failed.500: Server/runtime exception.