Bird
0
0

Which of the following is the correct way to represent an API key in a request header?

easy📝 Conceptual Q12 of 15
Microservices - Authentication and Authorization
Which of the following is the correct way to represent an API key in a request header?
A<code>Auth-Key: <API_KEY></code>
B<code>Authorization: Bearer <API_KEY></code>
C<code>API-Key: <API_KEY></code>
D<code>Key: <API_KEY></code>
Step-by-Step Solution
Solution:
  1. Step 1: Review common API key header formats

    API keys are often sent in headers named API-Key or similar, but Authorization: Bearer is usually for tokens, not API keys.
  2. Step 2: Identify the standard header for API keys

    API-Key is the widely accepted header for API keys, making API-Key: <API_KEY> correct.
  3. Final Answer:

    API-Key: <API_KEY> -> Option C
  4. Quick Check:

    API key header = API-Key [OK]
Quick Trick: API keys use 'API-Key' header, not 'Authorization: Bearer' [OK]
Common Mistakes:
MISTAKES
  • Using 'Authorization: Bearer' for API keys
  • Confusing header names
  • Omitting the key value

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes