Google Contact API V3 403 Forbidden

霸气de小男生 提交于 2020-01-02 23:04:28

问题


I am authenticating using OAuth2. Using an access token I can successfully access Calendar Lists via a Get, Calendar Events via a Post, and create a Calendar Event via a post. Every attempt to do a Get to get a Contact List fails with a 403 Forbidden.

I authenticated with the following scope scope=openid%20email%20https://www.googleapis.com/auth/calendar%20https://www.google.com/m8/feeds/

And during the login, see access to contacts listed.

My Get URL is https://www.google.com/m8/feeds/contacts/default/full?v=3.0

I have tried it with and without the v=3.0, and with my email address in place of default.

On the Google Developers console, I have Calendar API and Contact API enabled.

I had no trouble accessing the Contacts via the now deprecated V2 .net api, but using REST for V3 it just will not connect. Unfortunately, unlike the Calendar API, there is no "tester" at the bottom of the Google page to send an OAuth2 request to retrieve a list of contacts.

Has anyone gotten this to work, or is there something simple I am missing here?


回答1:


With Your request https://www.google.com/m8/feeds/contacts/default/full pass &key={{your__access_token}}.This should solve your problem.



来源:https://stackoverflow.com/questions/27130743/google-contact-api-v3-403-forbidden

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