google service account example returns “Error refreshing the OAuth2 token { “error” : “invalid_grant” }”

匆匆过客 提交于 2019-11-30 22:50:05

In my case it was caused by the server's time being too far off (about 5 minutes).

Although your issue is already solved, maybe this is of any help for someone who lands here in the future as the error returned by Google is the same.

I know that many people are facing the same problem like mine. So, this is the solution after days of search on google.

The code I proposed has only one error: the client id is like an email similar to 123456789-abcdebsbjf@developer.gserviceaccount.com

The second thing you have to do is to share the table you are quering in google fusion tables with the client id of the service account.

After that, thing will work perfectly.

I hope this would help other.

I got same error in google analytic API, I have solved it by adding my Service accounts Email address with google analytic account.

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