GET login/users/:user id

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
#REDIRECT [[GET login/users/:user id PT-BR]]
+
== Description ==
 +
 
 +
Returns user information, including his profile (if required).
 +
 
 +
== Resource URL ==
 +
 
 +
  GET https://api.socialidnow.com/v1/marketing/login/users/:user_id
 +
 
 +
== Parameters ==
 +
 
 +
=== URL Parameters ===
 +
 
 +
{|
 +
! align="left" width="200px" | user_id
 +
| width="200px" | required
 +
| user identifier.
 +
|}
 +
 
 +
=== JSON Parameters ===
 +
 
 +
{|
 +
! align="left" width="200px" | fields
 +
| width="200px" | optional
 +
| a list of user profile field names to be returned, joined by commas. See [[Social Profile Fields]].
 +
|}
 +
 
 +
== Authentication ==
 +
 
 +
This API requires Marketing Account authentication. See [[Authentication]].
 +
 
 +
== Response ==
 +
 
 +
=== Response Body ===
 +
 
 +
The following fields are returned:
 +
 
 +
{|
 +
! align="left" width="200px" | id
 +
| user identifier in the Social Login.
 +
|-
 +
! align="left" width="200px" | profile
 +
| a hash with the fields request by the parameter "fields". This field will only be present if at least one field is requested.
 +
|-
 +
! align="left" width="200px" | signed_in_at
 +
| date of user latest login.
 +
|-
 +
! align="left" width="200px" | signed_up_at
 +
| date of user creation.
 +
|-
 +
! align="left" width="200px" | token
 +
| user token. This token is used as user identifier in some Javascript APIs. See [[Social Login Tokens]] for more details.
 +
|}
 +
 
 +
== Examples ==
 +
 
 +
=== Without fields ===
 +
 
 +
==== Request ====
 +
 
 +
Returns information for user "340":
 +
 
 +
  curl -X GET 'https://api.socialidnow.com/v1/marketing/login/users/340' \
 +
        --user <api_id>:<api_secret>
 +
 
 +
==== Response ====
 +
 
 +
===== Response Body =====
 +
 
 +
{
 +
      "id": 340,
 +
      "signed_in_at": "2013-08-08T03:32:40Z",
 +
      "signed_up_at": "2012-10-04T14:34:10Z",
 +
      "token": "12345678901234567890123456789012",
 +
}
 +
 
 +
=== With fields ===
 +
 
 +
==== Request ====
 +
 
 +
Returns information for user "340" with profile fields display_name, verified_email e current_location:
 +
 
 +
  curl -X GET 'https://api.socialidnow.com/v1/marketing/login/users/340?fields=display_name,verified_email,current_location' \
 +
        --user <api_id>:<api_secret>
 +
 
 +
==== Response ====
 +
 
 +
===== Response Body =====
 +
 
 +
{
 +
      "id": 340,
 +
      "profile": {
 +
          "current_location": "Campinas, SP, Brasil",
 +
          "display_name": "John Doe",
 +
          "verified_email": "john.doe@somedomain.com"
 +
      },
 +
      "signed_in_at": "2013-08-08T03:32:40Z",
 +
      "signed_up_at": "2012-10-04T14:34:10Z",
 +
      "token": "12345678901234567890123456789012",
 +
}

Revision as of 04:55, 4 November 2014

Contents

Description

Returns user information, including his profile (if required).

Resource URL

  GET https://api.socialidnow.com/v1/marketing/login/users/:user_id

Parameters

URL Parameters

user_id required user identifier.

JSON Parameters

fields optional a list of user profile field names to be returned, joined by commas. See Social Profile Fields.

Authentication

This API requires Marketing Account authentication. See Authentication.

Response

Response Body

The following fields are returned:

id user identifier in the Social Login.
profile a hash with the fields request by the parameter "fields". This field will only be present if at least one field is requested.
signed_in_at date of user latest login.
signed_up_at date of user creation.
token user token. This token is used as user identifier in some Javascript APIs. See Social Login Tokens for more details.

Examples

Without fields

Request

Returns information for user "340":

 curl -X GET 'https://api.socialidnow.com/v1/marketing/login/users/340' \
        --user <api_id>:<api_secret>

Response

Response Body
{
     "id": 340,
     "signed_in_at": "2013-08-08T03:32:40Z",
     "signed_up_at": "2012-10-04T14:34:10Z",
     "token": "12345678901234567890123456789012",
}

With fields

Request

Returns information for user "340" with profile fields display_name, verified_email e current_location:

 curl -X GET 'https://api.socialidnow.com/v1/marketing/login/users/340?fields=display_name,verified_email,current_location' \
        --user <api_id>:<api_secret>

Response

Response Body
{
     "id": 340,
     "profile": {
         "current_location": "Campinas, SP, Brasil",
         "display_name": "John Doe",
         "verified_email": "john.doe@somedomain.com"
     },
     "signed_in_at": "2013-08-08T03:32:40Z",
     "signed_up_at": "2012-10-04T14:34:10Z",
     "token": "12345678901234567890123456789012",
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox