sbgonenc96 commited on
Commit
00155bb
·
verified ·
1 Parent(s): 6b319d2

Update st.secrets method

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.google.to_dict(), scopes)
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