after running python library, with Google api installed, I reported a connection timeout error. Is my agent not set up properly? But it"s okay for me to go to google? I use pycharm
from oauth2client.service_account import ServiceAccountCredentials
fsm_scope = "https://www.googleapis.com/auth/firebase.messaging"
def _get_access_token():
"""Retrieve a valid access token that can be used to authorize requests.
:return: Access token.
"""
credentials = ServiceAccountCredentials.from_json_keyfile_name(
"service-account.json", fsm_scope)
access_token_info = credentials.get_access_token()
return access_token_info.access_token
_get_access_token()
error message:
TimeoutError: [WinError 10060] the connection attempt failed because the connecting party did not reply correctly or the connected host did not respond after a period of time.