title: Google Sheets API: The caller does not have permission
body: <p>I'm trying to read the document from the cron:</p>
  
  <p><code>https://sheets.googleapis.com/v4/spreadsheets/&lt;sheet_id&gt;?key=&lt;api_key&gt;</code></p>
  
  <p>My document is available to anyone with the link.</p>
  
  <hr>
  
  <pre><code>My #1 key settings:    
  Application restrictions:
  
   - IP addresses (web servers, cron jobs, etc.) - I added my external IP address.
   - API restrictions - none
  </code></pre>
  
  <hr>
  
  <pre><code>My #2 key settings:
  Application restrictions:
  
   - IP addresses (web servers, cron jobs, etc.) - I added my external IP address.
   - API restrictions - Google Sheets API
  </code></pre>
  
  <hr>
  
  <pre><code>My #3 key settings:
  Application restrictions:
  
   - IP addresses (web servers, cron jobs, etc.) - I added my external IP address.
   - API restrictions - Google Sheets API, Google Drive API
  </code></pre>
  
  <hr>
  
  <pre><code>My #4 key settings:
  Application restrictions:
  
   - IP addresses (web servers, cron jobs, etc.) - none
   - API restrictions - Google Sheets API
  </code></pre>
  
  <hr>
  
  <pre><code>My #5 key settings:
  Application restrictions:
  
   - IP addresses (web servers, cron jobs, etc.) - none
   - API restrictions - Google Sheets API, Google Drive API
  </code></pre>
  
  <hr>
  
  <pre><code>My #6 key settings:
  Application restrictions:
  
   - IP addresses (web servers, cron jobs, etc.) - none
   - API restrictions - none
  </code></pre>
  
  <hr>
  
  <p>When I try to open a document with each key, I get a 403 error:</p>
  
  <pre><code>{
    "error": {
      "code": 403,
      "message": "The caller does not have permission",
      "status": "PERMISSION_DENIED"
    }
  }
  </code></pre>
  
  <p>The same error occurs when using the API Explorer (<a href="https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get" rel="noreferrer">https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get</a>).</p>
  
  <p>At the same time, the document itself opens successfully from a link from any computer and from any browser even to unauthorized users.</p>
  
  <p>This problem began on July 9 at 09:35 PM (UTC+0).</p>
  
  <p>Prior to this error, I successfully received data from the document using the <code>#1 key settings</code>.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I found another strange nuance: on all other documents there is no such problem. An error is observed on one particular document. I compared the access settings with others - they are identical.</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>I tried to copy the table and open it via API - the error was the same.
  An hour later I tried again - it all worked.</p>