People: get
Get a person's profile. If your app uses scope https://www.googleapis.com/auth/plus.login, this method is guaranteed to return ageRange and language. Try it now or see an example.
If using the userId value "me", this method requires authentication using a token that has been granted the OAuth scope https://www.googleapis.com/auth/plus.login or https://www.googleapis.com/auth/plus.me. Read more about OAuth.
Request
HTTP request
GET https://www.googleapis.com/plus/v1/people/userId
Parameters
Parameter name Value Description
Path parameters
userId string The ID of the person to get the profile for. The special value "me" can be used to indicate the authenticated user.
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a person resource in the response body.
Examples
Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages).
JAVAPHPPYTHONRUBYGOJAVASCRIPT
Uses the Java client library.
// This sample assumes a client object has been created.
// To learn more about creating a client, check out the starter:
// https://developers.google.com/+/quickstart/java
Person mePerson = plus.people().get("me").execute();
System.out.println("ID:\t" + mePerson.getId());
System.out.println("Display Name:\t" + mePerson.getDisplayName());
System.out.println("Image URL:\t" + mePerson.getImage().getUrl());
System.out.println("Profile URL:\t" + mePerson.getUrl());
Try it!
Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.
Authorize requests using OAuth 2.0:
userId
The ID of the person to get the profile for. The special value "me" can be used to indicate the authenticated user. (string)
fields
Selector specifying which fields to include in a partial response.
Use fields editor
bold red = required
EXECUTE