POST login/users/reset password/token

(Difference between revisions)
Jump to: navigation, search
m
Line 77: Line 77:
 
  Status: 201
 
  Status: 201
  
===== Response Body ======
+
===== Response Body =====
  
 
  {
 
  {
Line 102: Line 102:
 
  Status: 201
 
  Status: 201
  
===== Response Body ======
+
===== Response Body =====
  
 
  {
 
  {

Revision as of 00:16, 4 July 2020

Contents

Description

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

Resource URL

  POST https://api.socialidnow.com/v1/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 Social Login App authentication. See Authentication.

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/v1/marketing/login/users/reset_password/token' \
-d '{
      "username": "john_doe"
     }' \
-H 'Content-type: application/json' \
--user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

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/v1/marketing/login/users/reset_password/token' \
-d '{
      "email_address": "john_doe@domain.com"
     }' \
-H 'Content-type: application/json' \
--user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

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