OAuth authentication with a refresh tokenSource:
oauth_flow_refresh() to generate an access token, which is
then used to authenticate the request with
This is primarily useful for testing: you can manually execute another OAuth
flow (e.g. by calling
extract the refresh token from the result, and then save in an environment
variable for future use in automated tests.
When requesting an access token, the server may also return a new refresh
token. If this happens,
oauth_flow_refresh() will error, and you'll have
to create a new refresh token following the same procedure you did to get
the first token (so it's a good idea to document what you did the first time
because you might need to do it again).
A refresh token. This is equivalent to a password so shouldn't be typed into the console or stored in a script. Instead, we recommend placing in an environment variable; the default behaviour is to look in
Scopes to be requested from the resource owner.
List containing additional parameters passed to the
A modified HTTP request.