The Google Data Studio Custom Connector CLI depends on a command line utility called clasp to handle authenticated actions on Google Apps Script (i.e., the service that runs the custom connector code).
I have saved copies of both of my current credentials in my home directory as .clasprc.dm.json and .clasprc.radworks.json. I can manually swap between those, renaming the one I want to use as .clasprc.json.
In order to change users:
- Install clasp with
npm install -g @google/clasp - Run
clasp login - Authenticate with the new account in the browser window that pops up
This creates (or updates) a file ~/.clasprc.json which serves as the global authentication for any commands that call clasp.
There may be a way to create a local authentication file which would be the best way, but I haven’t tried it.
Notes
- Google claims you can use a local configuration file, but I can’t get that to work. The local file is ignored, even with the
isLocalCredsvalue set totrue.