Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Cisco Exam 200-901 Topic 1 Question 85 Discussion

Actual exam question for Cisco's 200-901 exam
Question #: 85
Topic #: 1
[All 200-901 Questions]

Refer to the exhibit.

A developer needs to create a webhook to send all Cisco Webex messages to a third-party tool by using the Cisco Webex API. The developer must Auhenticate with the API before any API calls can be made. To automate the procedure, a Python script is used. Which code snippet must be placed onto the blank in the code?

A)

B)

C)

D)

Show Suggested Answer Hide Answer
Suggested Answer: C

Importing Libraries: The script imports the requests and json libraries necessary for making HTTP requests and handling JSON data.

URLs Definition: The url1 variable holds the Webex API endpoint for creating webhooks, and url2 is the target URL where Webex will send the messages.

Token Handling: The token variable contains the OAuth2 token required for authentication with the Webex API.

Setting Headers: The headers dictionary includes the Content-Type set to application/json and the correct Authorization header that uses the Bearer token.

Payload Preparation: The payload dictionary contains the necessary information to create the webhook, including its name, target URL, resource type, and event.

Making the Request: The requests.request method sends a POST request to the Webex API endpoint with the specified headers and payload.

Printing the Response: The response from the Webex API is printed out, encoded in 'utf-8'.


Cisco Webex API Authentication

Cisco Webex API Guide

By correctly setting the Authorization header to include the Bearer token, the developer ensures that the script can authenticate and interact with the Webex API as required.

=========================

Contribute your Thoughts:

Minna
13 days ago
Hmm, you might be right. Option C does seem to have the necessary code for authentication. Let's see what others think.
upvoted 0 times
...
Shannon
19 days ago
I disagree, I believe the correct answer is Option C as it seems to have the correct syntax for authenticating with the Cisco Webex API.
upvoted 0 times
...
Minna
22 days ago
I think the answer is Option B because it looks like it includes the necessary code for authentication.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77