How to integrate Gmail Api in android app

陌路散爱 提交于 2019-12-25 06:34:23

问题


I have tried to integrate Gmail Api in my android app using the follwing tutorial https://developers.google.com/gmail/api/quickstart/android#step_5_setup_the_sample

I followed every steps , but when i tried to test gmail api

The following error occurred:

  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."
   } 

I have enabled Gmail Api and Google plus Api too . still the problem exist

Edit : My developer console page


回答1:


I think i found what mistake i have made , The SHA1 KEY I provided in the developer console is the signed version of my app , which is not placed in play store yet I changed the SHA1 Key to debug version of the app and it worked




回答2:


I registered the SHA1 key for the androiddebug (debug.keystore) and the key for the signed-release version (your own keystore) creating two OAuth 2.0 client IDs. This allowed me to test my app. Remember that sometimes the changes take a few hours to be reflected.



来源:https://stackoverflow.com/questions/37136085/how-to-integrate-gmail-api-in-android-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!