Google api 人员API-超过配额/超过FBS配额限制
google people api页面正确地说明了如何验证和列出10个示例联系人,并且一切工作都非常完美: 我可以完美地进行身份验证并列出10个联系人,但我在尝试创建新联系人时出错 api向我返回以下错误:Google api 人员API-超过配额/超过FBS配额限制,google-api,google-contacts-api,google-people,google-people-api,Google Api,Google Contacts Api,Google People,Google People Api,google people api页面正确地说明了如何验证和列出10个示例联系人,并且一切工作都非常完美: 我可以完美地进行身份验证并列出10个联系人,但我在尝试创建新联系人时出错 api向我返回以下错误: HttpError: <HttpError 429 when requesting https://people.googleapis.com/v1/people:createContact?alt=json returned "Resource has been exhausted
HttpError: <HttpError 429 when requesting https://people.googleapis.com/v1/people:createContact?alt=json returned "Resource has been exhausted (e.g. check quota).". Details: "[{'@type': 'type.googleapis.com/google.rpc.QuotaFailure', 'violations': [{'subject': 'QUOTA_EXCEEDED', 'description': 'FBS quota limit exceeded.'}]}]">
我完美地改变了范围,甚至在几个月前创建了联系人。
突然一切都停止了,我遇到了麻烦配额超过了并且FBS配额限制超过了
我重播了整个身份验证过程,甚至尝试列出联系人,没有问题,一切都可以完美地工作,而不是创建联系人
一些意见:
def main():
creds = None
# The file token.pickle stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists('token.pickle'):
with open('token.pickle', 'rb') as token:
creds = pickle.load(token)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json', SCOPES)
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.pickle', 'wb') as token:
pickle.dump(creds, token)
service = build('people', 'v1', credentials=creds)
#----------------creatingc contacts----------------------
print('trying')
for i in df_banco_linhas[:2]:
if i[1] not in df_csv_linhas:
time.sleep(3)
service.people().createContact( body={
"names": [
{
"givenName": i[0]
}
],
"phoneNumbers": [
{
'value': i[1]
}
]
}).execute()
print('create: ' + i[0])
time.sleep(3)
else:
print('NO')
if __name__ == '__main__':
main()
由于这个问题只发生在创建联系人时,我决定调查联系人数量的限制,我在文档中遇到了25000个限制 我被迫创建另一封电子邮件来解决这个问题,并将我的容量增加到50000个联系人(同步两封电子邮件)
他们的错误消息表示问题在配额限制(请求)内,而事实上是电子邮件联系人限制。错误429表示您可能违反了配额限制。当你打了太多电话时,你可能会被列入黑名单,过一段时间就会过期。也许你需要增加你的配额限制。如果您有一个G套件帐户,您应该与联系以获得进一步的帮助。我没有G套件帐户标准的关键写入配额应为90/分钟(1.5/秒),可能您的配额降低了?还请注意,读配额与写配额是分开的,因此您可以看到这些值并不意味着写配额没有用完。您应该尝试在console.developers.google.com上查找您的项目,并检查您的配额。如果你找不到你的项目,也许是你用另一个谷歌帐户创建的?我设法在一段时间后解决了它
def main():
creds = None
# The file token.pickle stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists('token.pickle'):
with open('token.pickle', 'rb') as token:
creds = pickle.load(token)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json', SCOPES)
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.pickle', 'wb') as token:
pickle.dump(creds, token)
service = build('people', 'v1', credentials=creds)
#----------------creatingc contacts----------------------
print('trying')
for i in df_banco_linhas[:2]:
if i[1] not in df_csv_linhas:
time.sleep(3)
service.people().createContact( body={
"names": [
{
"givenName": i[0]
}
],
"phoneNumbers": [
{
'value': i[1]
}
]
}).execute()
print('create: ' + i[0])
time.sleep(3)
else:
print('NO')
if __name__ == '__main__':
main()