200-901 Question 35
Single answerYou are tasked with developing an application that integrates with a network device using its REST API. The API documentation specifies that you need to send a POST request to the endpoint /api/v1/config with a JSON payload containing the device configuration. After sending the request, you receive a 401 Unauthorized response. What is the most likely cause of this issue?
- A
The HTTP method is not supported by the API.
- B
The API endpoint URL is incorrect.
- C
Authentication credentials are missing or incorrect.
- D
The JSON payload format is invalid.
Show answer and explanation
Correct answer: C
Explanation
A 401 Unauthorized response specifically indicates that the request lacks valid authentication credentials. In this scenario, the most likely cause of the issue is that authentication credentials are either missing or incorrect. To resolve this, you should review the API documentation for the required authentication method (e.g., API key, token, or username/password) and ensure that the request includes the correct credentials.
- A. Incorrect.
The HTTP method being unsupported would typically return a
405 Method Not Allowedresponse, not a401 Unauthorized. - B. Incorrect.
If the API endpoint URL were incorrect, you would likely receive a
404 Not Foundor similar error, not a401 Unauthorized. - C. Correct.
A
401 Unauthorizedresponse indicates an issue with authentication, such as missing or incorrect credentials. - D. Incorrect.
An invalid JSON payload would typically result in a
400 Bad Requestresponse, not a401 Unauthorized.