Spaces:
Running
Running
Update st.secrets method
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def add_email_to_sheet(email):
|
|
12 |
try:
|
13 |
# Set up Google Sheets API client
|
14 |
scopes = ["https://spreadsheets.google.com/feeds", "https://www.googleapis.com/auth/drive"]
|
15 |
-
creds = ServiceAccountCredentials.from_json_keyfile_dict(st.secrets
|
16 |
client = gspread.authorize(creds)
|
17 |
|
18 |
# Open the sheet and append the email
|
|
|
12 |
try:
|
13 |
# Set up Google Sheets API client
|
14 |
scopes = ["https://spreadsheets.google.com/feeds", "https://www.googleapis.com/auth/drive"]
|
15 |
+
creds = ServiceAccountCredentials.from_json_keyfile_dict(st.secrets["google"], scopes)
|
16 |
client = gspread.authorize(creds)
|
17 |
|
18 |
# Open the sheet and append the email
|