I'd like to use Google Execution Api from my chrome extension.
On the page below, there is a form to test execution api request, but when I send request, I get 403 error as response.
This person who posted this question seems to have solved his problem which is probably the same problem as mine. Why does my apps script deployed as API executable return Permission Denied?
But, I can't solve this error. Please guide me to help me this error.
Request
This is what I input into request form.
https://developers.google.com/apps-script/execution/rest/v1/scripts/run#try-it
Response
{
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}
Project Key : MVO00WF1oNYdJ7YvOZGxXh_z7UcVTY4Um
Scopes
I use spread sheet api so, I added spread sheet scope as additional scope for OAuth 2.0.
code.gs
This is a sample function code to call.
// This function does nothing. Just a test.
function myFunction(data) {
var sheet = SpreadsheetApp.getActiveSheet();
return "success!!";
}
The script associated with project
Additional Info
- I deployed my project as API executable.
- I enabled execution API on developer console.
- I made OAuth 2.0 Client ID on developer console.
Reference
https://developers.google.com/apps-script/guides/rest/api#limitations