GET login/users/find by

(Difference between revisions)
Jump to: navigation, search
(Description)
Line 107: Line 107:
 
   "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 135: Line 136:
 
   "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 163: Line 165:
 
   "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
 
  }
 
  }

Revision as of 20:10, 31 December 2019

Contents

Description

Finds a user by username, e-mail or reset password token.

Resource URL

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

Parameters

URL Parameters

username 1 optional username.
email_address 1 optional user e-mail address.
reset_password_token 1 optional user reset password token.

1 At least one of these fields must be given to identify the user.

Authentication

This API requires Social Login App authentication. See Authentication.

Response

Response Status

ok (200) The user was found successfully.
bad_request (400) Some required parameter was not informed.
unauthorized (401) The authentication is wrong. See Authentication.
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.
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/users/:user_id apis.
email_address email_address. Set by POST login/users and PUT login/users/:user_id 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.

Examples

Using username

Request

curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/users/find_by?username=john_doe' \
-H 'Content-type: application/json' \
--user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers
HTTP/1.1 200 Ok
Status: 200
Response Body
{
  "id": 341,
  "signed_in_at": "2014-10-24T08:13:51Z",
  "signed_up_at": "2014-10-23T16:47:15Z",
  "token": "f83f40b5658970893f2dc8e9dcbe01527573fb304c441c21513ef0be29a25990",
  "username": "john_doe",
  "email_address": "john_doe@domain.com",
  "active": true,
  "confirmed": true,
  "locked": false
}

Using email_address

Request

curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/users/find_by?email_address=john_doe@domain.com' \
-H 'Content-type: application/json' \
--user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers
HTTP/1.1 200 Ok
Status: 200
Response Body
{
  "id": 341,
  "signed_in_at": "2014-10-24T08:13:51Z",
  "signed_up_at": "2014-10-23T16:47:15Z",
  "token": "f83f40b5658970893f2dc8e9dcbe01527573fb304c441c21513ef0be29a25990",
  "username": "john_doe",
  "email_address": "john_doe@domain.com",
  "active": true,
  "confirmed": true,
  "locked": false
}

Using reset_password_token

Request

curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/users/find_by?reset_password_token=1eba3avc9c3bf803411l8d9e630e1800cba7666a3ccc93c71b6d31c43779j2bf' \
-H 'Content-type: application/json' \
--user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers
HTTP/1.1 200 Ok
Status: 200
Response Body
{
  "id": 341,
  "signed_in_at": "2014-10-24T08:13:51Z",
  "signed_up_at": "2014-10-23T16:47:15Z",
  "token": "f83f40b5658970893f2dc8e9dcbe01527573fb304c441c21513ef0be29a25990",
  "username": "john_doe",
  "email_address": "john_doe@domain.com",
  "active": true,
  "confirmed": true,
  "locked": false
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox