>Authenticating to an online service on behalf of the user.</li>
<li>Handling authentication errors.</li>
</ul>


<h2 id="Gather">Gather Information</h2>

<p>To begin using OAuth2, you need to know a few things about the API you're trying
to access:</p>

<ul>
<li>The url of the service you want to access.</li>
<li>The <strong>auth scope</strong>, which is a string that defines the specific
type of access your app is asking for. For instance, the auth scope for
read-only access to Google Tasks is <code>View 