【Google Admin SDK API】“HttpError 412”如何解决?

问题描述 投票:0回答:0

我想对在 GoogleWorkspace 中创建/删除用户的 python 脚本执行负载测试。但是,我遇到了以下错误。

googleapiclient.errors.HttpError: <HttpError 412 when requesting https://admin.googleapis.com/admin/directory/v1/users?alt=json returned "A request for user account creation is disallowed as we've detected some potentially abusive behavior. Please contact Google support for help."

■我想做的负载测试

我想确认使用“Google_add.py”可以成功创建1000个用户(并使用“Google_delete.py”成功删除),但由于我的许可证问题,我的GoogleWorkspace不能超过10个用户。

然后,我尝试创建一个用户并删除它,创建另一个用户并删除它......通过运行调用“Google_add.py”和“Google_delete.py”的shell脚本1000次。

■错误

运行“Google_add.py”时发生错误。

googleapiclient.errors.HttpError: <HttpError 412 when requesting https://admin.googleapis.com/admin/directory/v1/users?alt=json returned "A request for user account creation is disallowed as we've detected some potentially abusive behavior. Please contact Google support for help.">

我的操作被检测为“一些潜在的滥用行为。”

■问题

我升级许可证是解决此错误的唯一方法吗? 我认为很难准确识别为什么我的操作被检测为“一些潜在的滥用行为”,但请告诉我一些想法来解决这个错误,忽略它,不要发生它等等。

google-api google-api-client google-admin-sdk google-api-python-client
© www.soinside.com 2019 - 2024. All rights reserved.