PUT login/users/:user id/token

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
#REDIRECT [[PUT login/users/:user id/token PT-BR]]
+
== Description ==
 +
 
 +
Generates a new token (user_token) for the user.
 +
 
 +
This token can be used in the Javascript API [[socialid.login.loginUserToken]] to automatically login an user in the Social Login. In this way, the user will be able to use Social Login Widgets without having to login again in the social networks.
 +
 
 +
For security reasons, it is recommended to call this API regularly to generate a new user token.
 +
 
 +
== Resource URL ==
 +
 
 +
  PUT https://api.socialidnow.com/v1/marketing/login/users/:user_id/token
 +
 
 +
== Parameters ==
 +
 
 +
=== URL Parameters ===
 +
 
 +
{|
 +
! align="left" width="200px" | user_id
 +
| width="200px" | required
 +
| user identifier.
 +
|}
 +
 
 +
== Authentication ==
 +
 
 +
This API requires Marketing Account authentication. See [[Authentication]].
 +
 
 +
== Response ==
 +
 
 +
=== Response Body ===
 +
 
 +
The following fields are returned:
 +
 
 +
{|
 +
! align="left" width="200px" | id
 +
| user identifier in the Social Login.
 +
|-
 +
! align="left" width="200px" | signed_in_at
 +
| date of user latest login.
 +
|-
 +
! align="left" width="200px" | signed_up_at
 +
| date of user creation.
 +
|-
 +
! align="left" width="200px" | token
 +
| new user token.
 +
|}
 +
 
 +
== Examples ==
 +
 
 +
=== Request ===
 +
 
 +
Generates a new token for user "340".
 +
 
 +
  curl -X PUT 'https://api.socialidnow.com/v1/marketing/login/users/340/token' \
 +
        --user <api_id>:<api_secret>
 +
 
 +
=== Response ===
 +
 
 +
==== Response Body ====
 +
 
 +
{
 +
      "id": 340,
 +
      "signed_in_at": "2013-08-08T03:32:40Z",
 +
      "signed_up_at": "2012-10-04T14:34:10Z",
 +
      "token": "12345678901234567890123456789012",
 +
}

Revision as of 04:38, 4 November 2014

Contents

Description

Generates a new token (user_token) for the user.

This token can be used in the Javascript API socialid.login.loginUserToken to automatically login an user in the Social Login. In this way, the user will be able to use Social Login Widgets without having to login again in the social networks.

For security reasons, it is recommended to call this API regularly to generate a new user token.

Resource URL

  PUT https://api.socialidnow.com/v1/marketing/login/users/:user_id/token

Parameters

URL Parameters

user_id required user identifier.

Authentication

This API requires Marketing Account authentication. See Authentication.

Response

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 new user token.

Examples

Request

Generates a new token for user "340".

 curl -X PUT 'https://api.socialidnow.com/v1/marketing/login/users/340/token' \
        --user <api_id>:<api_secret>

Response

Response Body

{
     "id": 340,
     "signed_in_at": "2013-08-08T03:32:40Z",
     "signed_up_at": "2012-10-04T14:34:10Z",
     "token": "12345678901234567890123456789012",
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox