title: Gmail API returns 403 error code and "Delegation denied for <user email>"
body: <p>Gmail API fails for one domain when retrieving messages with this error:</p>
  
  <pre><code>com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 OK
  {
    "code" : 403,
    "errors" : [ {
      "domain" : "global",
      "message" : "Delegation denied for &lt;user email&gt;",
      "reason" : "forbidden"
    } ],
    "message" : "Delegation denied for &lt;user email&gt;"
  }
  </code></pre>
  
  <p>I am using OAuth 2.0 and Google Apps Domain-Wide delegation of authority to access the user data. The domain has granted data access rights to the application.</p>