Open TheLimey opened 8 years ago
Now it does not work at all: just a 404 error on login. The docs just have a comment "Auth here" with no example of how to connect the gdata api to the oauth2 authorization. Here is an example for others who arrive here looking for information:
http://stackoverflow.com/questions/16026286/using-oauth2-with-service-account-on-gdata-in-python
Thanks @rocketraman , I was exactly looking for that. The repository samples should be updated at some point ...
The Calendar example does not work too. Below is the output from latest Ubuntu 19.04:
$ /usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py --user [username] --pw [password]
Traceback (most recent call last):
File "/usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py", line 617, in <module>
main()
File "/usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py", line 613, in main
sample = CalendarExample(user, pw)
File "/usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py", line 51, in __init__
self.cal_client.ClientLogin(email, password, self.cal_client.source);
File "/usr/lib/python2.7/dist-packages/gdata/client.py", line 441, in client_login
captcha_token=captcha_token, captcha_response=captcha_response)
File "/usr/lib/python2.7/dist-packages/gdata/client.py", line 373, in request_client_login_token
response, ClientLoginFailed, response_body)
gdata.client.ClientLoginFailed: Server responded to ClientLogin request: 404, https://developers.google.com/accounts/docs/AuthForInstalledApps
While trying to learn how to use the Google Contacts API from python, I followed links from here:
https://developers.google.com/google-apps/contacts/v3/?csw=1#running_the_sample_code
...to this repo.
I worked out that gdata requires TLS Lite, and that TLS Lite needs m2crypto to stop it from erroring. However, having cleared all those hurdles, I found that your sample scripts are using OAuth V1 which YOU deprecated FOUR years ago!!! ....the four years is according to this page:
https://developers.google.com/identity/protocols/AuthForInstalledApps
Please follow you own advice and upgrade the sample scripts to OAuth 2.0 as soon as possible.
Thank you =)