Exception using People API
See original GitHub issueThe dotnet client does not have any documentation of People API. I am trying to use People API by imitating the documentation of Java samples given here: https://developers.google.com/people/quickstart/java. Here’s what I’ve tried:
public void Connections()
{
// Request 10 connections.
var request = service.People.Connections
.List("people/me");
request.PageSize = 10;
//request.Fields = "names,emailAddresses";
request.Fields = "names";
var response = request.Execute();
// Print display name of connections if available.
var connections = response.Connections;
foreach (var connection in connections)
{
var names = connection.Names;
foreach (var name in names)
{
Console.WriteLine($"{name.DisplayName}");
}
}
}
Unfortunately I’m seeing the following exception:
Google.GoogleApiException HResult=0x80131500 Message=Google.Apis.Requests.RequestError Request contains an invalid argument. [400] Errors [ Message[Invalid Parameter] Location[fields - parameter] Reason[invalidParameter] Domain[global] ]
Source=Google.Apis
Issue Analytics
- State:
- Created 6 years ago
- Comments:9
Top Results From Across the Web
Null reference exception on Person object in Google ...
Closed 2 years ago. I am trying to add a contact to my Google contacts account. This is the code: // Create new...
Read more >Status | People API
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is ......
Read more >Method: people.get | People API
Provides information about a person by specifying a resource name. Use people/me to indicate the authenticated user. The request returns a 400 ......
Read more >Re: I can't update Google Contact
Person class that I set in several its fields this is the result: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
Read more >Class: Google::Apis::PeopleV1::PeopleServiceService
Provides information about a list of specific people by specifying a list of requested resource names. Use people/me to indicate the authenticated user....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now it works. It looks like there are two different nuget packages from Google for People API. To make matter worse the older one comes up top when searched in Visual Studio.
Can you unlist the Google.Apis.People.v1 package? https://www.nuget.org/packages/Google.Apis.People.v1/