req_oauth {httr2} | R Documentation |
This is a low-level helper for automatically authenticating a request with an OAuth flow, caching the access token and refreshing it where possible. You should only need to use this function if you're implementing your own OAuth flow.
req_oauth(req, flow, flow_params, cache)
req |
A request. |
flow |
Function used to generate the access token. |
flow_params |
List of parameters to call |
cache |
An object that controls how the token is cached. This should be a list containing three functions:
|
An oauth_token.