401 ( Unauthorised ) error when using jQuery's $.get and GMail API

后端 未结 1 984
灰色年华
灰色年华 2021-01-28 13:34

I\'m trying to run jQuery\'s $.get after having a user log in with the G+ API with javascript, but am getting a 401 ( unauthorised ) error in the browser console.

Here i

相关标签:
1条回答
  • 2021-01-28 14:06

    Each request to the Gmail API requires an access token, so an API key will not be enough.

    While the user may have logged in with the G+ API that does not by itself give your app authorized access to the user's Gmail.

    Check here for more details on getting access to the Gmail API: https://developers.google.com/gmail/api/overview#auth_and_the_gmail_api

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