User API \ Read the details of a user PHP SDK

Send a GET request to this resource to retrieve the details of an existing user.

Resource/URI GET POST PUT DELETE
Users /users.json List all
users
Import from access token
User /users/<user_token>.json Retrieve user details Delete
user
User /users/<user_token>/contacts.json Read user contacts
User /users/<user_token>/publish.json Publish on social networks

Workflow

Request: the code to send to the API

Send a GET request to the resource /users/<user_token>.json to obtain the details of an existing user. The <user_token> has to be replaced by the unique token of an existing user.

Result: the code returned by the API

The API returns the details of the corresponding user including his identities. Depending on the social network, more or less information is available.

Example Resultset

	{
		"response": {
			"request": {
				"date": "Tue, 13 Sep 2011 11:24:28 +0200",
				"resource": "/users/2cec711d-ca14-4472-98c8-ca74432bc2d3.json",
				"status": {
					"flag": "success",
					"code": 200
				}
			},
			"result":{
				"data":{
					"user":{
						"user_token": "2cec711d-ca14-4472-98c8-ca74432bc2d3",
						"date_creation": "Tue, 1 Sep 2011 11:01:12 +0200",
						"date_last_login": "Tue, 13 Sep 2011 01:05:07 +0200",
						"num_logins": "64",
						"identities": [
							{
								"identity_token": "cd3bd13b-b393-4d6c-a7f6-950b4c47938f",
								"provider": "twitter",
								"id": "http://twitter.com/ExampleUser",
								"displayName": "Firstname Lastname",
								"name":{
									"formatted": "Firstname Lastname"
								},
								"gender": "male",
								"utcOffset": "2:00"			
							},
							{
								"identity_token": "3ab5257b-ba2b-4242-a7f6-950b4c47938f",
								"provider": "facebook",
								"id": "http://www.facebook.com/profile.php?id=1046121518",
								"displayName": "Firstname Lastname",
								"name":{
									"formatted": "Firstname Lastname"
									"givenName": "Firstname",
									"familyName": "Lastname"
								},
								"gender": "male",
								"birthday": "01/01/1980",
								"utcOffset": "2:00",
								"emails":[
									{
										"value": "email@example.com",
										"is_verified": "true"
									}
								]
							}           
						]
					}
				}
			}
		}
	}

User Contributed Notes