EVOLUTION-MANAGER
Edit File: oauth2.0_token.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Generate an oauth2.0 token.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for oauth2.0_token {httr}"><tr><td>oauth2.0_token {httr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate an oauth2.0 token.</h2> <h3>Description</h3> <p>This is the final object in the OAuth dance - it encapsulates the app, the endpoint, other parameters and the received credentials. It is a reference class so that it can be seamlessly updated (e.g. using <code style="white-space: pre;">$refresh()</code>) when access expires. </p> <h3>Usage</h3> <pre> oauth2.0_token( endpoint, app, scope = NULL, user_params = NULL, type = NULL, use_oob = getOption("httr_oob_default"), oob_value = NULL, as_header = TRUE, use_basic_auth = FALSE, cache = getOption("httr_oauth_cache"), config_init = list(), client_credentials = FALSE, credentials = NULL, query_authorize_extra = list() ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>endpoint</code></td> <td> <p>An OAuth endpoint, created by <code><a href="oauth_endpoint.html">oauth_endpoint()</a></code></p> </td></tr> <tr valign="top"><td><code>app</code></td> <td> <p>An OAuth consumer application, created by <code><a href="oauth_app.html">oauth_app()</a></code></p> </td></tr> <tr valign="top"><td><code>scope</code></td> <td> <p>a character vector of scopes to request.</p> </td></tr> <tr valign="top"><td><code>user_params</code></td> <td> <p>Named list holding endpoint specific parameters to pass to the server when posting the request for obtaining or refreshing the access token.</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>content type used to override incorrect server response</p> </td></tr> <tr valign="top"><td><code>use_oob</code></td> <td> <p>if FALSE, use a local webserver for the OAuth dance. Otherwise, provide a URL to the user and prompt for a validation code. Defaults to the of the <code>"httr_oob_default"</code> default, or <code>TRUE</code> if <code>httpuv</code> is not installed.</p> </td></tr> <tr valign="top"><td><code>oob_value</code></td> <td> <p>if provided, specifies the value to use for the redirect_uri parameter when retrieving an authorization URL. Defaults to "urn:ietf:wg:oauth:2.0:oob". Requires <code>use_oob = TRUE</code>.</p> </td></tr> <tr valign="top"><td><code>as_header</code></td> <td> <p>If <code>TRUE</code>, the default, configures the token to add itself to the bearer header of subsequent requests. If <code>FALSE</code>, configures the token to add itself as a url parameter of subsequent requests.</p> </td></tr> <tr valign="top"><td><code>use_basic_auth</code></td> <td> <p>if <code>TRUE</code> use http basic authentication to retrieve the token. Some authorization servers require this. If <code>FALSE</code>, the default, retrieve the token by including the app key and secret in the request body.</p> </td></tr> <tr valign="top"><td><code>cache</code></td> <td> <p>A logical value or a string. <code>TRUE</code> means to cache using the default cache file <code>.httr-oauth</code>, <code>FALSE</code> means don't cache, and <code>NA</code> means to guess using some sensible heuristics. A string means use the specified path as the cache file.</p> </td></tr> <tr valign="top"><td><code>config_init</code></td> <td> <p>Additional configuration settings sent to <code><a href="POST.html">POST()</a></code>, e.g. <code><a href="user_agent.html">user_agent()</a></code>.</p> </td></tr> <tr valign="top"><td><code>client_credentials</code></td> <td> <p>Default to <code>FALSE</code>. Set to <code>TRUE</code> to use <em>Client Credentials Grant</em> instead of <em>Authorization Code Grant</em>. See <a href="https://tools.ietf.org/html/rfc6749#section-4.4">https://tools.ietf.org/html/rfc6749#section-4.4</a>.</p> </td></tr> <tr valign="top"><td><code>credentials</code></td> <td> <p>Advanced use only: allows you to completely customise token generation.</p> </td></tr> <tr valign="top"><td><code>query_authorize_extra</code></td> <td> <p>Default to <code>list()</code>. Set to named list holding query parameters to append to initial auth page query. Useful for some APIs.</p> </td></tr> </table> <h3>Details</h3> <p>See <code><a href="Token-class.html">Token()</a></code> for full details about the token object, and the caching policies used to store credentials across sessions. </p> <h3>Value</h3> <p>A <code>Token2.0</code> reference class (RC) object. </p> <h3>See Also</h3> <p>Other OAuth: <code><a href="oauth1.0_token.html">oauth1.0_token</a>()</code>, <code><a href="oauth_app.html">oauth_app</a>()</code>, <code><a href="oauth_endpoint.html">oauth_endpoint</a>()</code>, <code><a href="oauth_service_token.html">oauth_service_token</a>()</code> </p> <hr /><div style="text-align: center;">[Package <em>httr</em> version 1.4.2 <a href="00Index.html">Index</a>]</div> </body></html>