Many APIs provide API keys that can be used to authenticate requests (or, often, provide other information about the user). This function helps to apply those keys to requests.
Arguments
- req
(
httr2_request
) Ahttr2::request()
object.- ...
Additional parameters depending on the location of the API key.
parameter_name
(length-1 character
, "header" or "query" only) The name of the parameter to use in the header or query.api_key
(length-1 character
, "header" or "query" only) The API key to use.path
(length-1 character
, "cookie" only) The location of the cookie.
- location
(
length-1 character
) Where the API key should be passed. One of"header"
(default),"query"
, or"cookie"
.
Value
A httr2::request()
object.