Bird
0
0

You want to securely get an access token for a backend service using client credentials flow. Which of these is the best practice?

hard📝 Application Q15 of 15
Rest API - Authentication and Authorization
You want to securely get an access token for a backend service using client credentials flow. Which of these is the best practice?
ASend client ID and secret in POST body with Content-Type application/x-www-form-urlencoded over HTTPS
BSend client ID and secret in HTTP headers without encryption
CSend client ID and secret in URL query parameters over HTTPS
DSend client ID and secret in plain text over HTTP
Step-by-Step Solution
Solution:
  1. Step 1: Identify secure transmission method

    Client credentials must be sent securely to avoid exposure.
  2. Step 2: Choose correct method and protocol

    Sending in POST body with form encoding over HTTPS ensures confidentiality and standard compliance.
  3. Final Answer:

    Send client ID and secret in POST body with Content-Type application/x-www-form-urlencoded over HTTPS -> Option A
  4. Quick Check:

    Use POST body + HTTPS for secure client credentials [OK]
Quick Trick: Always use POST with HTTPS and form data for client credentials [OK]
Common Mistakes:
  • Sending secrets in URL query parameters
  • Using HTTP instead of HTTPS
  • Sending secrets in headers without encryption

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes