def refresh_access_token(refresh_token, client_id): result = None try: payload = 'refresh_token=%s&client_id=%s&grant_type=refresh_token' % (refresh_token, client_id) connection = httplib.HTTPSConnection('api.hubapi.com') connection.request('POST', '/auth/v1/refresh', payload) result = connection.getresponse() result = result.read() except: logger.exception(make_log_msg("refesh authentication for HubSpot", str(refresh_token), str(client_id), traceback.format_stack())) return result
This is the code we are using for refresh token, we have been using it for a long time, and had no issue, but starting from this early morning, we cannot get tokens anymore, what happened, it is urgent, we need to fix it as soon possible, all integration breaks with this error. Thanks
This is the error we get from return result,Access Denied
You don’t have permission to access “http://api.hubapi.com/contacts/v1/contact/?” on this server.
The weird thing is, I tried to directly invoke this API from testing server, and it works, but our producation server are keeping get this error.