Why does the Meraki dashboard API return a 404 rather than a 403 code in response to a request with an invalid API key?
- The 404 return code determines whether unauthorized users will try again.
- The 403 return code would indicate that the client definitely has an invalid API key.
- The 404 return code prevents the system from indicating the existence of resources to unauthorized users.
- The 403 return code would indicate that there are no resources at that endpoint but the API key could be correct.
Answers Explanation & Hint:
Fo the Meraki Dashboard API, every request must specify an API key via a request header. The API will return a 404 (rather than a 403) code in response to a request with a missing or incorrect API key. This behavior prevents leaking even the existence of resources to unauthorized users. |