1

Im working on Contact's API with oAuth 2.0.. I want to fetch only a few fields and not the whole dataset. It works fine on the OAuth playground https://developers.google.com/oauthplayground

However, when using Jquery ajax to request it (after getting the token), it gives me the error Fields query parameter is not supported. Without the &fields= param, it works fine..

Here are the details about the fields param: https://developers.google.com/gdata/docs/2.0/reference#PartialResponse

Btw, the reason for ajax request is well listed here: Getting google contacts with javascript

Community
  • 1
  • 1
Raheel Hasan
  • 5,753
  • 4
  • 39
  • 70

1 Answers1

0

The OAuth2 playground works with Google Contacts API V3, and the fields param is supposed to work with deprecated API v2 (you can even see a warning in the link you pointed for the fields params).

For V3, you cannot specify few fields than allowed. But you can select between a short answer, full answer with default fields, and full answer with extra fields not returned by default.

See Projection Values.

So, probably you want to request the thin Projection Value.

You can see it in action in the Playground using this URL on step 3:

https://www.google.com/m8/feeds/contacts/default/thin?alt=json

Pay attention to the thin, when most people and tutorials use full.

Rael Gugelmin Cunha
  • 3,327
  • 30
  • 25
  • well, its working on Playground (which you say is V3), but not working on actual calls.. so if its deprecated, it wont work on oAuth2 playground as well.... – Raheel Hasan Jan 20 '15 at 13:57