PUT login/users/:user id/token

From Social ID Developers
Revision as of 04:38, 4 November 2014 by Gabriel.prado (Talk | contribs)
Jump to: navigation, search

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