- Home
- Tools
- Developer Tools
- HTTP Status Codes
- 406 Not Acceptable
406 Not Acceptable
The server has no version of the resource that fits what the Accept headers of the request ask for.
- Class
- 4xx Client error. The request is the problem: a wrong address, missing credentials, data the server can't accept.
- Defined in
- RFC 9110
What causes it
When the client says which formats, languages or encodings it takes, the server only has others, and it is strict about it. A request with Accept: application/xml to an API that only speaks JSON, for instance. Many servers aren't strict and send what they have with a 200.
What to do about it
Look at the Accept, Accept-Language and Accept-Encoding headers of the request and widen them, or leave them out. In an API client the culprit is usually an Accept header left over from the defaults of a library or from a copied example.
Not to be confused with
| 415 Unsupported Media Type | The other direction: the server doesn't accept the format of what the client sent. |
|---|---|
| 300 Multiple Choices | The server has several versions and lets the client choose. |
All codes are on the list of HTTP status codes, which can be searched by number and by word.
Other 4xx codes
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 424 Failed Dependency
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons