300-835 · Question #51
Refer to the exhibit. A collaboration engineer needs to create a new Webex user. Which code snippet must be placed in the blank in the code to meet this requirement? import requests body = {…
The correct answer is C. apiUri = 'https://webexapis.com/v1/people' access_token = 'your_access_token' httpHeaders = { 'Content-type': 'application/json/charset=UTF-8', 'Authorization': 'Bearer your_access_token' }. Option C is correct because creating a new Webex user requires the /v1/people endpoint - this is the API resource that maps directly to user accounts. It also correctly includes the Content-type: application/json header, which is needed for POST requests that send a JSON body…
Question
Options
- AapiUri = 'https://webexapis.com/v1/memberships' authorization = 'your_access_token' httpHeaders = { 'Authorization': 'Bearer your_access_token' }
- BapiUri = 'https://webexapis.com/v1/people' authorization = 'Bearer your_access_token' httpHeaders = { 'Authorization': 'Bearer your_access_token' }
- CapiUri = 'https://webexapis.com/v1/people' access_token = 'your_access_token' httpHeaders = { 'Content-type': 'application/json/charset=UTF-8', 'Authorization': 'Bearer your_access_token' }
- DapiUri = 'https://webexapis.com/v1/memberships' access_token = 'your_access_token' httpHeaders = { 'Content-type': 'application/json/charset=UTF-8', 'Authorization': 'Bearer your_access_token' }
How the community answered
(29 responses)- A17% (5)
- B7% (2)
- C72% (21)
- D3% (1)
Explanation
Option C is correct because creating a new Webex user requires the /v1/people endpoint - this is the API resource that maps directly to user accounts. It also correctly includes the Content-type: application/json header, which is needed for POST requests that send a JSON body, alongside the Authorization: Bearer header required for authentication.
Why the distractors fail:
- A & D both use
/v1/memberships, which is the wrong endpoint - that API manages adding existing users to Webex spaces/rooms, not creating new user accounts. - B uses the correct
/v1/peopleendpoint but is missing theContent-typeheader, and its unusedauthorizationvariable is misleadingly set to'Bearer your_access_token'(the "Bearer" prefix belongs in the header value, not a standalone variable).
Memory tip: Think "People create People." When you want to create a user (a person), you POST to /v1/people. Reserve /v1/memberships for room/space membership operations. Also remember the POST checklist: you always need both Authorization and Content-type headers when sending a JSON body to the Webex API.
Topics
Community Discussion
No community discussion yet for this question.