GET /oauth/login/user

From Social ID Developers
(Difference between revisions)
Jump to: navigation, search
(Response Body)
(Request)
 
(8 intermediate revisions by one user not shown)
Line 20: Line 20:
 
== Authentication ==
 
== Authentication ==
  
This API requires Login User Token authentication. See [[Authentication]].
+
This API requires Login User Token authentication. See [[OAuth_APIs|OAuth]].
  
 
== Response ==
 
== Response ==
Line 30: Line 30:
 
|-
 
|-
 
! align="left" width="200px" | unauthorized (401)
 
! align="left" width="200px" | unauthorized (401)
| The authentication is wrong. See [[Authentication]].
+
| The authentication is wrong. See [[OAuth_APIs|OAuth]].
 
|-
 
|-
 
! align="left" width="200px" | not_found (404)
 
! align="left" width="200px" | not_found (404)
Line 70: Line 70:
 
! align="left" width="200px" | confirmed
 
! align="left" width="200px" | confirmed
 
| boolean flag to inform whether the user has confirmed his email address. See [[POST login/users/send_email_confirmation]] for instructions on how to add email address confirmation.
 
| boolean flag to inform whether the user has confirmed his email address. See [[POST login/users/send_email_confirmation]] for instructions on how to add email address confirmation.
 +
|-
 +
! align="left" width="200px" | locked
 +
| boolean flag to inform whether the user is locked due to too many login attempts with an incorrect password. See [[Login App Security Settings]] and [[PUT login/users/:user_id/unlock]].
 
|}
 
|}
  
Line 81: Line 84:
  
 
   curl -X GET 'https://api.socialidnow.com/v2/marketing/login/user' \
 
   curl -X GET 'https://api.socialidnow.com/v2/marketing/login/user' \
         -H "Authentication: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"
+
         -H "Authorization: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"
  
 
==== Response ====
 
==== Response ====
Line 94: Line 97:
 
       "username": "john_doe",
 
       "username": "john_doe",
 
       "email_address": "john_doe@domain.com",
 
       "email_address": "john_doe@domain.com",
       "active": "true",
+
       "active": true,
       "confirmed": "true"
+
       "confirmed": true,
 +
      "locked": false
 
  }
 
  }
  
Line 102: Line 106:
 
==== Request ====
 
==== Request ====
  
Returns information for the user with profile fields display_name, verified_email e current_location:
+
Returns information for the user with profile fields display_name, verified_email and current_location:
  
 
   curl -X GET 'https://api.socialidnow.com/v2/marketing/login/user?fields=display_name,verified_email,current_location' \
 
   curl -X GET 'https://api.socialidnow.com/v2/marketing/login/user?fields=display_name,verified_email,current_location' \
         -H "Authentication: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"
+
         -H "Authorization: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"
  
 
==== Response ====
 
==== Response ====
Line 120: Line 124:
 
       "signed_in_at": "2013-08-08T03:32:40Z",
 
       "signed_in_at": "2013-08-08T03:32:40Z",
 
       "signed_up_at": "2012-10-04T14:34:10Z",
 
       "signed_up_at": "2012-10-04T14:34:10Z",
       "token": "12345678901234567890123456789012"
+
       "token": "12345678901234567890123456789012",
 +
      "username": "john_doe",
 +
      "email_address": "john_doe@domain.com",
 +
      "active": true,
 +
      "confirmed": true,
 +
      "locked": false
 
  }
 
  }

Latest revision as of 20:51, 17 September 2019

Contents

Description

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

Resource URL

  GET https://api.socialidnow.com/v2/marketing/login/user

Parameters

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 Login User Token authentication. See OAuth.

Response

Response Status

ok (200) The request was successful.
unauthorized (401) The authentication is wrong. See OAuth.
not_found (404) The user was not found.
internal_server_error (500) An unknown error happened.

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.
username username. Set by POST login/users and PUT login/user apis.
email_address email_address. Set by POST login/users and PUT login/user apis.
active boolean flag to inform whether the user is activated for login. Set by PUT login/users/:user_id/activate and PUT login/users/:user_id/deactivate apis.
confirmed boolean flag to inform whether the user has confirmed his email address. See POST login/users/send_email_confirmation for instructions on how to add email address confirmation.
locked boolean flag to inform whether the user is locked due to too many login attempts with an incorrect password. See Login App Security Settings and PUT login/users/:user_id/unlock.

Examples

Without fields

Request

Returns information for the user:

 curl -X GET 'https://api.socialidnow.com/v2/marketing/login/user' \
        -H "Authorization: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"

Response

Response Body
{
     "id": 340,
     "signed_in_at": "2013-08-08T03:32:40Z",
     "signed_up_at": "2012-10-04T14:34:10Z",
     "token": "12345678901234567890123456789012",
     "username": "john_doe",
     "email_address": "john_doe@domain.com",
     "active": true,
     "confirmed": true,
     "locked": false
}

With fields

Request

Returns information for the user with profile fields display_name, verified_email and current_location:

 curl -X GET 'https://api.socialidnow.com/v2/marketing/login/user?fields=display_name,verified_email,current_location' \
        -H "Authorization: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"

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",
     "username": "john_doe",
     "email_address": "john_doe@domain.com",
     "active": true,
     "confirmed": true,
     "locked": false
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox