POST oauth/login/users/reset password/token

From Social ID Developers
Revision as of 13:14, 13 July 2018 by Ivan.filho (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Description

Creates a reset password token for a user given its username or e-mail.

Resource URL

  POST https://api.socialidnow.com/v2/marketing/login/users/reset_password/token

Parameters

JSON Parameters

username 1 optional username.
email_address 1 optional user e-mail.

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

Authentication

This API requires Login App Token authentication. See OAuth.

Response

Response Status

created (201) The reset password token has been created.
bad_request (400) Some required parameter was not informed.
unauthorized (401) The authentication is wrong. See Authentication.
internal_server_error (500) An unknown error happened.

Response Body

The following fields are returned:

user_id user identifier who owns the reset password token
reset_password_token reset password token.


Examples

Using username

Request

curl -iX POST 'https://api.socialidnow.com/v2/marketing/login/users/reset_password/token' \
-d '{
      "username": "john_doe"
     }' \
-H 'Content-type: application/json' \
-H "Authorization: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"

Response

Response Headers
HTTP/1.1 201 Created
Status: 201
Response Body =
{
   "user_id": 321,
   "reset_password_token": "1epa2a1c4c3bg82344208d1eki0e1800cba7666a3ccc93c71b6j21c4319646cl"
}

Using email_address

Request

curl -iX POST 'https://api.socialidnow.com/v2/marketing/login/users/reset_password/token' \
-d '{
      "email_address": "john_doe@domain.com"
     }' \
-H 'Content-type: application/json' \
-H "Authorization: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"

Response

Response Headers
HTTP/1.1 201 Created
Status: 201
Response Body =
{
   "user_id": 321,
   "reset_password_token": "12793t6gtyuiej1puoey87868eiqwuygdhjvd167ie82i1uge21ve2167ie8i21d"
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox