Manage passwords, id, and security issues within the GAS

Asked 2 years ago, Updated 2 years ago, 59 views

I want to call an API periodically, but the execution uses a trigger.
Hard coding of passwords, IDs, and tokens is a problem.
I think it should be stored separately from the source code.

Previously
project properties User properties appear to exist, but
It seems to have been deprecated now.

Is there a replacement for this?

I think it's common to all programs
About Passwords, IDs
If you run it manually, you can enter the password here every time, but
When it comes to automatic execution, it has to be stored somewhere, so
I'd like to know the basic way of thinking.

Enter a description of the image here

api google-apps-script

2022-09-29 21:34

1 Answers

Originally, user properties were not meant to store user-specific information (above all, they were left unattended for many years and then disappeared)

Now, if you want to be secure when storing Access Token and information,

1. Allow users to use only the HTML Service UI and keep the spreadsheet private
2. Read and write JSON files placed on each user's Google Drive (not open to the public of course)
3. Prepare a mechanism to save to a specific spreadsheet and retrieve and search user's email address through the library function.

I think it will be a three-choice.
I think the best one is 2.I often use 3.

Using properties in Google Apps Script


2022-09-29 21:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.