There are several examples for 'keep the connection with google spreadsheet alive' But all I found are based on the 'old' Google Sign-In system which isn't work anymore since april 2015
What is the proper methode to keep the connection with googlespreadsheet alive using OAuth 2.0
I've Tried this
import gspread
from oauth2client.service_account import ServiceAccountCredentials
headers = gspread.httpsession.HTTPSession(headers={'Connection':'Keep-Alive'}) #Allows a persistant connection.
scope = ['https://spreadsheets.google.com/feeds']
credentials = ServiceAccountCredentials.from_json_keyfile_name('Apps Script Execution API.json', scope)
c = gspread.authorize(auth=credentials,http_session=headers)
result: c = gspread.authorize(auth=credentials,http_session=headers) TypeError: authorize() got an unexpected keyword argument 'auth'