req_auth_bearer_token | R Documentation |
A bearer token gives the bearer access to confidential resources (so you should keep them secure like you would with a user name and password). They are usually produced by some large authentication scheme (like the various OAuth 2.0 flows), but you are sometimes given then directly.
req_auth_bearer_token(req, token)
req |
A httr2 request object. |
token |
A bearer token |
A modified HTTP request.
See RFC 6750 for more details about bearer token usage with OAuth 2.0.
req <- request("http://example.com") |> req_auth_bearer_token("sdaljsdf093lkfs")
req
# httr2 does its best to redact the Authorization header so that you don't
# accidentally reveal confidential data. Use `redact_headers` to reveal it:
print(req, redact_headers = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.