我尝试使用以下教程在我的Android应用中集成Gmail Api https://developers.google.com/gmail/api/quickstart/android#step_5_setup_the_sample
我遵循了每一步,但是当我尝试测试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。问题仍然存在
答案 0 :(得分:0)
我想我发现我犯了什么错误, 我在开发者控制台中提供的SHA1 KEY是我的应用程序的签名版本,该版本尚未放置在Play商店中 我将SHA1密钥更改为应用程序的调试版本并且可以正常工作
答案 1 :(得分:0)
我注册了androiddebug(debug.keystore)的SHA1密钥和签名发布版本(您自己的密钥库)的密钥,创建了两个OAuth 2.0客户端ID。这让我可以测试我的应用程序。 请记住,有时需要花费几个小时来反映这些变化。