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

前端 未结 3 495
悲&欢浪女
悲&欢浪女 2021-01-06 08:34

My goal is to make the simplest query on Google Fusion Tables on behalf of my web app users. For that, I created a service account on google co

相关标签:
3条回答
  • 2021-01-06 09:05

    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.

    0 讨论(0)
  • 2021-01-06 09:05

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

    0 讨论(0)
  • 2021-01-06 09:16

    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.

    0 讨论(0)
提交回复
热议问题