I'm creating a application that requires the user to select a folder from their Drive. I'm struggling to set up the Picker API.
Following this documentation I set up my project using their 'Hello World' script but after changing the 'devlopedKey' and 'clientID', I test the code to receive the error:
Error 401, invalid_client, no registered origin.
After searching around I found suggestions to set the Authorised JavaScript origin within the client credential to http://localhost:8888. After doing this I receive a different error:
Error 400, origin_mismatch
Sorry if this is a simple mistake of mine, any help would be appreciated.
You have to setOrigin specifically for google apps script.
Here is the documentation: https://developers.google.com/apps-script/guides/dialogs#file-open_dialogs