Authorization error even though all were authorized

806 views
Skip to first unread message

Mateusz Krajewski

unread,
Dec 21, 2022, 8:48:50 AM12/21/22
to Google Apps Script Community
Hi there,
I am trying to write a simple script which creates google calendar event with google meet link. 

This is the error message I am getting all the time:
Exception: The script does not have permissions to perform this action. Required permissions: (https://www.googleapis.com/auth/calendar || https://www.googleapis.com/auth/calendar.readonly || https://www.google.com/calendar/feeds)

I have authorised all necessary permissions and tried to edit manifest .json file adding those OAuth scopes from the error but it still happens. I am wondering whether this is available only for paid licences? I mean maybe I cannot do that on my free Google Workspace account?

Thanks in advance!
Cheers,
Matt

MERRY CHRISTMAS EVERYONE 🎄🎅🎁


Arthur M. Futoryan

unread,
Dec 21, 2022, 8:57:47 AM12/21/22
to Google Apps Script Community
People you are sharing with/to must also have Google Workspace accounts and probably paid. Try the same stuff but with your simple personal google....and share your calendar with everyone else.... just guessing ;)

Mateusz Krajewski

unread,
Dec 21, 2022, 9:18:15 AM12/21/22
to Google Apps Script Community
I am sharing with Google Workspace users only. This project now is settled on my free personal Google account. Not sure I understand your proposal... sorry for that. Thanks for reply, though!

Arthur M. Futoryan

unread,
Dec 23, 2022, 2:20:15 AM12/23/22
to google-apps-sc...@googlegroups.com
I think (from my own tinkering experience) that free and workspace don't mix. So your sharing has to be free to free (personal to personal). Anything that's personal to company gets blocked. 

Also, maybe the people you're sharing with have not accepted your calendar sharing invite. 

Don't be sorry...Ive lost many hours of sleep over something that seems unnecessarily complex. 

Let me know if you want me to try to do it for you.. or try to do what you're doing with me. I have a personal account: arthurm...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/39a31af1-a39f-4ac0-9e37-3249ad4a7ac7n%40googlegroups.com.

Mateusz Krajewski

unread,
Dec 27, 2022, 10:05:38 AM12/27/22
to Google Apps Script Community
I have been out for the Christmas time but I am back again. Thanks for your reply. Let me try to explain how it is all made:
1. I have a spreadsheet where my clients choose time slots to meet that I create weekly (this action triggers an email script which informs me that someone has chosen specific time)
2. I open the spreadsheet using direct link in the email and tick "choose field" next to this slot what triggers another script. This is what the script does:
  • creates google calendar event with google meet link,
  • logs that update and creates record with this information in "logs" sheet,
Everything works fine except the meeting creation I am getting this error:

Exception: The script does not have permissions to perform this action. Required permissions: (https://www.googleapis.com/auth/calendar || https://www.googleapis.com/auth/calendar.readonly || https://www.google.com/calendar/feeds)

Answering your thoughts:
  • I do not share my calendar with any people, I just create an event and share that with the person,
  • I do not mix free with workspace (all the people use private free accounts)

Mateusz Krajewski

unread,
Jan 2, 2023, 5:39:12 PM1/2/23
to Google Apps Script Community
Just in case of future questions

Finally I managed to make it work. There were two problems:
  1. Authorisation (when script is fired by triggers no authorisation windows pops up. I had to create simple test function and run in once through the editor to authorise my project).
  2. Simple trigger onEdit(e) couldn't fire my function (I have no idea why... I think that is because of limitations I wasn't aware of). When I switched that to the installable one which fires my custom named function it all started working.
Script finally create events with google meet links and this is so awesome!
Thanks for help.
Reply all
Reply to author
Forward
0 new messages