You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey i am trying to access Google Drive via this app and I am trying to upload and list files. But I am facing issue when the access_token expires after an hour. from where should I get refresh_token.
Here is the repo: https://github.com/rahul3103/test_google_login
google.auth.exceptions.RefreshError
google.auth.exceptions.RefreshError: The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_uri, client_id, and client_secret.
Traceback (most recent call last)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/rahul/projects/personal/code/app.py", line 57, in home
fields="nextPageToken, files(id, name)"
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/googleapiclient/http.py", line 835, in execute
method=str(self.method), body=self.body, headers=self.headers)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/googleapiclient/http.py", line 162, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/google_auth_httplib2.py", line 213, in request
self.credentials.refresh(self._request)
File "/Users/rahul/.virtualenvs/drive/lib/python3.6/site-packages/google/oauth2/credentials.py", line 129, in refresh
'The credentials do not contain the necessary fields need to '
google.auth.exceptions.RefreshError: The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_uri, client_id, and client_secret.
The text was updated successfully, but these errors were encountered:
Hey i am trying to access Google Drive via this app and I am trying to upload and list files. But I am facing issue when the
access_token
expires after an hour. from where should I getrefresh_token
.Here is the repo: https://github.com/rahul3103/test_google_login
The text was updated successfully, but these errors were encountered: