QuestionQ103
Understanding and Using APIsA resource called /item is secured with OAuth2 authentication. An endpoint called /login must request authentication. Which method must be used to access the resource through the REST API?
- A Make a GET call to /login that includes the username and password, and retrieve a token to insert into the /item call.
- B Make a POST call to /login including the user credentials in the message, and retrieve a token to insert into the authorization header of the /item call.
- C Make a GET call to /item, then make a call to /login that includes the username and password in the body of the message, and wait for the authorization code.
- D Make a POST call to /item that includes the username and password in the body of the request message, and submit it to request access.
Community Discussion