MARKETING-CLOUD-DEVELOPER practice question 4 of 10

A developer receives a 401 Unathorized HTTP status message from a REST API request. What is the reason for this error?

Full set: 196 questions
Answer options
A: The account lacks the privileges necessary to perform the request
B: The access token was not found in the request, or it is invalid or expired Correct answer
C: OAuth is not supported for the requested resource
D: API requests are temporarily blocked due to too many concurrent requests.
Correct Answer:
B. The access token was not found in the request, or it is invalid or expired
Explanation

A 401 Unauthorized error indicates either the absence of an access token in the request or that the provided token is invalid or has expired, necessitating a re-authentication.

Why Incorrect

A. Lack of privileges usually results in a 403 Forbidden error, not a 401.
C. OAuth is supported for API resources; if not, it would be a different HTTP error.
D. Too many requests typically result in a 429 Too Many Requests error, not a 401.

References

- Salesforce Marketing Cloud API Error Codes Documentation, pp. 5-6.

- OAuth 2.0 RFC 6749, Section 5.2, pp. 28-29.

- REST API Error Handling Guidelines, pp. 2-3.

- Stanford University Course on Web Security, "API Authentication and Error Codes," pp. 10-11.

Scroll to Top