POST access_tokens/generate_otp

Available from CRM.COM R13.0.0

Deprecated from CRM.COM R18.0.0

This method generates a one-time password (OTP) for an access token, by providing the access token identifier. A single access token otp can be generated by each call. 

Resource URL

http://host_name/crmapi/rest/$version/access_tokens/generate_otp 

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

access_token_identifier

(mandatory)

Access Token identifier  

The identifier of the access token for which a one-time password will be generated. The allowed access token identifier fields are the following:

Name

Type

Description

authentication_code

(semi-optional)

String

The authentication code of the access token

identifier

(semi-optional)

StringThe identifier of the access token. If the identifier is specified then it will be validated against the specified pass code

pass_code

(mandatory on conditions)

StringThe pass code of the access token, which is applicable and mandatory if the identifier is specified

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Response Data

NameType Description
idStringThe ID of the related access token
numberStringThe number of the related access token
one_time_passwordIntegerThe generated one-time password (OTP)
expiration_dateDateThe date when the one-time password generated will be expired

Examples

 Example 1

HTTP Method: POST


Request:

Body:

 {
  "token":"{{token}}",
	"access_token_identifier":{"authentication_code":"117"}
}


Response:

 {
  "data": {
    "number": "AT0000000758",
    "one_time_password": "073482",
    "id": "5E94D0D8D3C84ED6A07A3F5E91CFC948",
    "expiration_date": "2017-05-22T13:48:07"
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}