We have an application using Google Contacts with 2-legged OAuth 1.0 which works great but we want to migrate to OAuth 2.0. So far it looks like old GData libraries aren't playing nice with this OAuth 2.0 and 2-legged authorization. On the other hand new google-api-client libraries handles this gracefully but it doesn't provide Contacts API. So we wanted to use the new GoogleCredentials
which are really simple to use with the old ContactsService but it the Bearer
token is set to null
in the request causing java.lang.NullPointerException: No authentication header information
. Does anybody have an idea what may go wrong?
Anonymized test script can be found at https://gist.github.com/musketyr/9394815