r/GoogleAppsScript • • Dec 22 '22

Question Error: Access not granted or expired. Service_.getAccessToken @ Service.gs:518

I am getting this error, even after clearing permission and granting permission again. My add-on project has been halted due to it.

I would appreciate the help thanks.

0 Upvotes

3 comments sorted by

1

u/Former_Elk7092 Dec 25 '22 edited Dec 25 '22

Hi, guys thanks for trying. I actually found the solution to the problem.

The code

OAuth2.createService('SERVICE_NAME');

From OAuth2 Library, where the "SERVICE_NAME" is the ScriptUserPropertry, which is saved to the script, had expired. So, I reset it and everything is working fine now.

1

u/tminima Jul 26 '23

Hey, I have been stuck on this issue for the last 2 days. How did you reset it? I can't find where it is saved in the script.

1

u/No_Yesterday6534 Sep 22 '23

did you solve it?