POST login/users/email confirmation/token

(Difference between revisions)
Jump to: navigation, search
(Created page with "== Description == Creates an email confirmation token for a user given its username or e-mail. == Resource URL == POST https://api.socialidnow.com/v1/marketing/login/use...")
 
Line 1: Line 1:
 
== Description ==
 
== Description ==
  
Creates an email confirmation token for a user given its username or e-mail.
+
Creates an e-mail confirmation token for a user given its username or e-mail.
  
 
== Resource URL ==
 
== Resource URL ==
Line 32: Line 32:
 
{|
 
{|
 
! align="left" width="200px" | created (201)
 
! align="left" width="200px" | created (201)
| The email confirmation token has been created.
+
| The e-mail confirmation token has been created.
 
|-
 
|-
 
! align="left" width="200px" | bad_request (400)
 
! align="left" width="200px" | bad_request (400)

Revision as of 14:00, 8 July 2020

Contents

Description

Creates an e-mail confirmation token for a user given its username or e-mail.

Resource URL

  POST https://api.socialidnow.com/v1/marketing/login/users/email_confirmation/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 e-mail confirmation 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 email confirmation token
email_confirmation_token email confirmation token.


Examples

Using username

Request

curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/users/email_confirmation/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,
   "email_confirmation_token": "649e9097196c3ccf91a50f84cdb77da1315d905c68b54bbc20f094aafd036414"
}

Using email_address

Request

curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/users/email_confirmation/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,
   "email_confirmation_token": "c7236426186ab29eedafec803f3914b4e450131095609411156839c1af77ecbc"
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox