nerdexam
Cisco

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…

Cisco Webex API

Question

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 = { 'emails': [ '[email protected]' ], 'displayName': 'User One', 'firstName': 'User-name', 'lastName': 'User-lastname' } requests.post(url = apiUri, json = body, headers = httpHeaders)

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)
  • A
    17% (5)
  • B
    7% (2)
  • C
    72% (21)
  • D
    3% (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/people endpoint but is missing the Content-type header, and its unused authorization variable 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

#Webex People API#REST API authentication#Bearer token#HTTP headers

Community Discussion

No community discussion yet for this question.

Full 300-835 Practice