Bird
0
0

Which of the following is the correct way to request an access token using OAuth 2.0 Authorization Code flow?

easy📝 Syntax Q3 of 15
Rest API - Authentication and Authorization
Which of the following is the correct way to request an access token using OAuth 2.0 Authorization Code flow?
APOST to resource server with user password
BPOST to token endpoint with authorization code and client credentials
CGET to resource server with client ID only
DGET to authorization server with access token
Step-by-Step Solution
Solution:
  1. Step 1: Recall Authorization Code flow

    After getting an authorization code, the client sends a POST request to the token endpoint with the code and client credentials.
  2. Step 2: Evaluate options

    Only POST to token endpoint with authorization code and client credentials matches this correct step. Others misuse HTTP methods or endpoints.
  3. Final Answer:

    POST to token endpoint with authorization code and client credentials -> Option B
  4. Quick Check:

    Token request = POST with code + credentials [OK]
Quick Trick: Token requests use POST with code and client info [OK]
Common Mistakes:
  • Using GET instead of POST for token request
  • Sending password instead of authorization code
  • Requesting token from resource server

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes