How to implement Refresh Token in Service Account
up vote
1
down vote
favorite
I am a student currently doing a digital sign in page as a project. I'm relatively new to Python but I need help with implementing a refresh token because after the sign in page has been open for an hour, it stops uploading entries to the Google sheet it's supposed to update with a log. Here's the gspread setup:
import guizero
import tkinter
import datetime
import gspread
import time
from oauth2client.service_account
import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive' ]
creds = ServiceAccountCredentials.from_json_keyfile_name('ESDSignInSheet.json', scope)
client = gspread.authorize(creds)
sheet = client.open("ESD & Cleanroom Approved Persons & Parts List ").worksheet('ESD APPROVAL LIST')
log = client.open("ESD Sign In Log").sheet1
Let me know if any more info is needed for you to help me. Thank you in advance for the help!
python oauth-2.0 token gspread
add a comment |
up vote
1
down vote
favorite
I am a student currently doing a digital sign in page as a project. I'm relatively new to Python but I need help with implementing a refresh token because after the sign in page has been open for an hour, it stops uploading entries to the Google sheet it's supposed to update with a log. Here's the gspread setup:
import guizero
import tkinter
import datetime
import gspread
import time
from oauth2client.service_account
import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive' ]
creds = ServiceAccountCredentials.from_json_keyfile_name('ESDSignInSheet.json', scope)
client = gspread.authorize(creds)
sheet = client.open("ESD & Cleanroom Approved Persons & Parts List ").worksheet('ESD APPROVAL LIST')
log = client.open("ESD Sign In Log").sheet1
Let me know if any more info is needed for you to help me. Thank you in advance for the help!
python oauth-2.0 token gspread
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am a student currently doing a digital sign in page as a project. I'm relatively new to Python but I need help with implementing a refresh token because after the sign in page has been open for an hour, it stops uploading entries to the Google sheet it's supposed to update with a log. Here's the gspread setup:
import guizero
import tkinter
import datetime
import gspread
import time
from oauth2client.service_account
import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive' ]
creds = ServiceAccountCredentials.from_json_keyfile_name('ESDSignInSheet.json', scope)
client = gspread.authorize(creds)
sheet = client.open("ESD & Cleanroom Approved Persons & Parts List ").worksheet('ESD APPROVAL LIST')
log = client.open("ESD Sign In Log").sheet1
Let me know if any more info is needed for you to help me. Thank you in advance for the help!
python oauth-2.0 token gspread
I am a student currently doing a digital sign in page as a project. I'm relatively new to Python but I need help with implementing a refresh token because after the sign in page has been open for an hour, it stops uploading entries to the Google sheet it's supposed to update with a log. Here's the gspread setup:
import guizero
import tkinter
import datetime
import gspread
import time
from oauth2client.service_account
import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive' ]
creds = ServiceAccountCredentials.from_json_keyfile_name('ESDSignInSheet.json', scope)
client = gspread.authorize(creds)
sheet = client.open("ESD & Cleanroom Approved Persons & Parts List ").worksheet('ESD APPROVAL LIST')
log = client.open("ESD Sign In Log").sheet1
Let me know if any more info is needed for you to help me. Thank you in advance for the help!
python oauth-2.0 token gspread
python oauth-2.0 token gspread
edited Nov 9 at 21:48
Naveen
566112
566112
asked Nov 9 at 21:38
Max Pinckney
62
62
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233578%2fhow-to-implement-refresh-token-in-service-account%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown