Getting a 406 Error Code - What’s Causing It and How Do I Fix It? or Why Am I Seeing a 406 Error Code

14 Replies, 1100 Views

Ugh, 406 errors are the worst. Had this happen when my client’s CMS was forcing weird headers.

Two things that worked for me:
1. Forcing the Accept header in PHP: `header('Accept: application/json');`
2. Using curl to test the request directly—sometimes browsers add junk headers.

If you’re on WordPress, the "Rest API" plugin can help debug too.

Messages In This Thread



Users browsing this thread: 1 Guest(s)