Courseiva
API Automation →mediumMultiple Choice

UiPath-ADPv1 API Automation Practice Question

A developer is using the HTTP Request activity to call a REST API that returns a 401 Unauthorized response. The API documentation states that the access token must be included in the 'Authorization' header as 'Bearer <token>'. The developer has already obtained a valid token and stored it in a string variable named 'accessToken'. Which configuration should the developer apply to the HTTP Request activity to ensure the token is sent correctly?

⚠ Common exam trap

The trap here is assuming the HTTP Request activity has a built-in Bearer authentication option, leading to incorrect configuration.

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

✓

In the Headers property, add a new header with Name 'Authorization' and Value 'Bearer ' + accessToken.

To send a Bearer token, the developer must add an 'Authorization' header with the value 'Bearer ' followed by the token. The HTTP Request activity allows adding custom headers via the Headers property. This is the standard and secure method. Other options either place the token in the wrong location or use unsupported authentication configurations.

Answer analysis

Option-by-option breakdown

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

  • ✗

    In the Authentication property, select 'Bearer' and enter the accessToken variable in the Password field.

    Why it's wrong here

    The HTTP Request activity's Authentication property supports Basic, Digest, and OAuth 2.0, but not a generic 'Bearer' option that takes a token directly. OAuth 2.0 configuration requires additional token endpoint details. Therefore, this option is not valid and would not send the token correctly.

  • ✓

    In the Headers property, add a new header with Name 'Authorization' and Value 'Bearer ' + accessToken.

    Why this is correct

    The Authorization header with the value 'Bearer ' concatenated with the token is the standard way to send a Bearer token. The HTTP Request activity's Headers property accepts a dictionary of header names and values. This configuration ensures the token is transmitted correctly and the API can authenticate the request.

  • ✗

    In the URL property, append '?access_token=' + accessToken as a query string parameter.

    Why it's wrong here

    While some APIs accept tokens as query parameters, the documentation explicitly requires the token in the Authorization header. Sending it as a query string parameter may be ignored or considered insecure. This approach would not satisfy the API's authentication requirement and could expose the token in logs.

  • ✗

    In the Body property, add a JSON object with a key 'Authorization' and value 'Bearer ' + accessToken.

    Why it's wrong here

    The Authorization header must be sent as an HTTP header, not in the body. Placing it in the body will not be recognized by the API for authentication, and the request will still return 401. The body is for the request payload, not for authentication metadata.

About these practice questions

One of 276 original UiPath-ADPv1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 UiPath exam blueprint

This UiPath-ADPv1 practice question is part of Courseiva's free UiPath 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 UiPath-ADPv1 exam.