Courseiva

200-901 Cisco Platforms and Development Practice Question

A developer is creating a Python script that uses the Cisco Webex Teams REST API. The script needs to read the WEBCEX_ACCESS_TOKEN environment variable and include it as a Bearer token in the HTTP Authorization header for every request. Which code snippet correctly accomplishes this?

⚠ Common exam trap

The trap here is assuming that any Authorization header with the token will work, forgetting that the 'Bearer' prefix is mandatory for OAuth 2.0 bearer tokens.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

headers = {'Authorization': 'Bearer ' + os.environ['WEBEX_ACCESS_TOKEN']}

The Webex Teams API uses OAuth 2.0 bearer tokens, so the Authorization header must be in the format 'Bearer <token>'. The code must read the token from the environment variable and concatenate it with the 'Bearer ' prefix. Using os.environ or os.getenv is appropriate, but the scheme must be 'Bearer'. The other options either use the wrong scheme or omit the prefix, leading to authentication failures.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    headers = {'Authorization': os.environ['WEBEX_ACCESS_TOKEN']}

    Why it's wrong here

    This omits the required 'Bearer' prefix, so the API will not recognize the credential format. The Authorization header must be 'Bearer <token>' for OAuth 2.0 bearer token usage. Without the scheme, the server cannot parse the token, leading to authentication failure. The token value alone is insufficient.

  • ✗

    headers = {'Authorization': 'Basic ' + os.environ['WEBEX_ACCESS_TOKEN']}

    Why it's wrong here

    Using 'Basic' indicates HTTP Basic Authentication, which expects a base64-encoded username:password pair, not a bearer token. Webex Teams API does not accept Basic auth with an access token. This would cause a 401 error. The correct scheme is 'Bearer' for OAuth tokens, so this is incorrect.

  • ✓

    headers = {'Authorization': 'Bearer ' + os.environ['WEBEX_ACCESS_TOKEN']}

    Why this is correct

    This snippet retrieves the token from the environment variable and constructs the correct 'Bearer <token>' string for the Authorization header. The Webex Teams API requires this exact header format for authentication. Using os.environ ensures the token is not hard-coded, which is a security best practice. The concatenation is valid because os.environ returns a string.

  • ✗

    headers = {'Authorization': 'Token ' + os.getenv('WEBEX_ACCESS_TOKEN')}

    Why it's wrong here

    The 'Token' prefix is not valid for Webex Teams API authentication; it expects 'Bearer'. While os.getenv works similarly to os.environ, the authentication scheme is wrong. This would result in a 401 Unauthorized response. The developer must use 'Bearer' to match the API specification, not a generic token scheme.

About these practice questions

This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Cisco exam blueprint

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.