POST login/users/reset password/token

From Social ID Developers
(Difference between revisions)
Jump to: navigation, search
(Created page with "== 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/re...")
 
 
(2 intermediate revisions by 2 users not shown)
Line 25: Line 25:
 
== Authentication ==
 
== Authentication ==
  
This API requires Social Login App authentication. See [[Authentication]].
+
This API requires Login App authentication. See [[Authentication]].
  
 
== Response ==
 
== Response ==
  
==== Response Status ====
+
=== Response Status ===
 
{|
 
{|
 
! align="left" width="200px" | created (201)
 
! align="left" width="200px" | created (201)
Line 42: Line 42:
 
! align="left" width="200px" | internal_server_error (500)
 
! align="left" width="200px" | internal_server_error (500)
 
| An unknown error happened.
 
| An unknown error happened.
 +
|}
 +
 +
=== Response Body ===
 +
 +
The following fields are returned:
 +
 +
{|
 +
! align="left" width="200px" | user_id
 +
| user identifier who owns the reset password token
 +
|-
 +
! align="left" width="200px" | reset_password_token
 +
| reset password token.
 
|}
 
|}
  
Line 56: Line 68:
 
       }' \
 
       }' \
 
  -H 'Content-type: application/json' \
 
  -H 'Content-type: application/json' \
-H 'Accept-language: en' \
 
 
  --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
 
  --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
  
Line 66: Line 77:
 
  Status: 201
 
  Status: 201
  
===== Response Body ======
+
===== Response Body =====
  
 
  {
 
  {
Line 82: Line 93:
 
       }' \
 
       }' \
 
  -H 'Content-type: application/json' \
 
  -H 'Content-type: application/json' \
-H 'Accept-language: en' \
 
 
  --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
 
  --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
  
Line 92: Line 102:
 
  Status: 201
 
  Status: 201
  
===== Response Body ======
+
===== Response Body =====
  
 
  {
 
  {

Latest revision as of 16:51, 30 December 2021

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 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