req_auth <- function(req) {
req_oauth_bearer_jwt(
req,
client = oauth_client("example", "https://example.com/get_token"),
claim = jwt_claim()
)
}
request("https://example.com") |>
req_auth()
Run the code above in your browser using DataLab