title: Why does my apps script deployed as API executable return Permission Denied?
body: <p>I created a script in the script editor, published it as a "Deploy as API executable". Inside this script, I provided a doc_id to my sheet and defined a function to get data from that sheet.</p>
  
  <p>I then went to <a href="https://developers.google.com/apps-script/execution/rest/v1/scripts/run">https://developers.google.com/apps-script/execution/rest/v1/scripts/run</a> to test the execution API. I added the scopes, authorized the app and tried it. I am getting the following error message:</p>
  
  <pre><code>"error": {
    "code": 403,
    "message": "The caller does not have permission",
    "status": "PERMISSION_DENIED"
  }
  </code></pre>
  
  <p>Can someone tell me what I am doing wrong?</p>