我尝试使用以下教程https://developers.google.com/gmail/api/quickstart/android#step_5_setup_the_sample在我的Android应用程序中集成Gmail Api
我按照每一步,但当我试图测试gmail api
发生以下错误:
403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "Access Not Configured. Gmail API has not been used in project 608941808256 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/gmail/overview?project=608941808256 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"reason" : "accessNotConfigured",
"extendedHelp" : "https://console.developers.google.com/apis/api/gmail/overview?project=608941808256"
} ],
"message" : "Access Not Configured. Gmail API has not been used in project 608941808256 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/gmail/overview?project=608941808256 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
我也启用了Gmail Api和Google + Api . 仍然存在问题
2 回答
我想我发现了我犯了什么错误,我在开发者控制台中提供的SHA1 KEY是我的应用程序的签名版本,它没有放在Play商店中但我将SHA1 Key更改为应用程序的调试版本并且它工作正常
我为androiddebug(debug.keystore)注册了SHA1密钥,并为签名发布版本(您自己的密钥库)注册了密钥,创建了两个OAuth 2.0客户端ID . 这让我可以测试我的应用程序 . 请记住,有时候这些变化需要几个小时才能得到反映 .