PUT login/users/:user id/token

From Social ID Developers
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 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.
username username. Set by POST login/users and PUT login/users/:user_id apis.
email_address email_address. Set by POST login/users and PUT login/users/:user_id apis.
active boolean flag to inform whether the user is activated for login. Set by PUT login/users/:user_id/activate and PUT login/users/:user_id/deactivate apis.
confirmed boolean flag to inform whether the user has confirmed his email address. See POST login/users/send_email_confirmation for instructions on how to add email address confirmation.

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",
     "username": "john_doe",
     "email_address": "john_doe@domain.com",
     "active": "true",
     "confirmed": "true"
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox