简体   繁体   English

Play Integrity API 令牌产生 IntegrityErrorCode.html#TOO_MANY_REQUESTS

[英]Play Integrity API token produces IntegrityErrorCode.html#TOO_MANY_REQUESTS

I'm trying to migrate from SafetyNet to Play Integrity API following googles documentation https://developer.android.com/google/play/integrity/verdict#request .我正在尝试根据谷歌文档https://developer.android.com/google/ver/integrity从 SafetyNet 迁移到 Play Integrity API。
I'm building my request the same way they do in docs:我正在以与文档中相同的方式构建我的请求:

    Task<IntegrityTokenResponse> integrityTokenTask =
            integrityManager.requestIntegrityToken(
                            IntegrityTokenRequest.builder()
                                    .setCloudProjectNumber(CLOUD_PROJECT_NUMBER)
                                    .setNonce(Base64.encodeToString(NONCE_IN_BYTES, Base64.URL_SAFE | Base64.NO_WRAP))
                                    .build();

But when I'm trying to invoke token() on the result I get TOO_MANY_REQUESTS error even though I'm sending only one request.但是,当我尝试对结果调用 token() 时,即使我只发送一个请求,我也会收到 TOO_MANY_REQUESTS 错误。

integrityTokenTask.getResult().token();

An error occurred in main and is: -8: Integrity API error (-8): The calling app is making too many requests to the API and hence is throttled.

Play Integrity is properly set up in my Google Console. Play Integrity 已在我的 Google 控制台中正确设置。
Any ideas what I might be doing wrong?有什么想法我可能做错了吗?

Play Integrity API must be enabled in Google Play Console, not Cloud console, if your app is on-Play.如果您的应用正在播放,则必须在 Google Play 控制台而非云控制台中启用 Play Integrity API。 Please, specify your console where you setup PIA.请指定您设置 PIA 的控制台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM