I am building an app using google's drive API and I am using a JSON API key. Whenever I run the following code:
# these are api managing credentials
scope = ['https://spreadsheets.google.com/spreadsheets']
creds = ServiceAccountCredentials.from_json('client_secret', scope)
client = gspread.authorize(creds) # this connects the the google api using credentials
I get this weird error message:
File "C:/Users/Will Kaiser's PC/Documents/PyCharm/Projects/ph/main.py", line 16, in <module>
creds = ServiceAccountCredentials.from_json('client_secret.json', scope)
TypeError: from_json() takes 2 positional arguments but 3 were given
This to me is a very weird error since I am giving the function 2 arguments. My keys are in a JSON file and all of that is done correctly.