200-901 exam dumps

200-901 practice question 49 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 49

Single answer

A developer is creating an application that interacts with a REST API. The API requires clients to authenticate using an API key included in the request header. Which header must the developer include in their HTTP requests to authenticate successfully?

  1. A

    Authorization: Bearer <API_KEY>

  2. B

    Authorization: Basic <API_KEY>

  3. C

    API-Key: <API_KEY>

  4. D

    X-API-Key: <API_KEY>

Show answer and explanation

Correct answer: D

Explanation

When using API keys as an authentication mechanism, the 'X-API-Key' header is a standard and widely accepted method for including the key in HTTP requests. Other options such as 'Authorization: Bearer' or 'Authorization: Basic' are used for token-based and Basic Authentication, respectively, and are not appropriate for API key-based authentication.

  • A. Incorrect.

    This header format is typically used for OAuth 2.0 Bearer token authentication, not for API key-based authentication.

  • B. Incorrect.

    This header is used for Basic Authentication, which involves a base64-encoded username and password, not an API key.

  • C. Incorrect.

    While this header might seem plausible, it is not a standard header used for API key authentication.

  • D. Correct.

    This is the most commonly used header for API key authentication, where 'X-API-Key' is the standard header key and '<API_KEY>' represents the actual API key.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam