Method:/token/create
Example 1: Create a token
Request
{
"attrs":
[
"product.id": "pid",
"user.id": "userid",
"pin": "tokenpin"
]
}
Response
{
"error":0,
"result":
{
"id": "token id"
}
}
Example 2: Create a token and assign the token to a user
Request
{
"attrs":
[
"product":
{
"manufacturerCode":"DN",
"productCode":"MT"
},
"user":
{
"domain.name":"domain.com",
"loginNam":"john.smith"
}
"pin": "tokenpin"
]
}
Response
{
"error":0,
"result":
{
"id": "token id"
}
}
Example 3: Create a token and assign the token, and get the token assignment ID
Request
{
"attrs":
[
"product":
{
"manufacturerCode":"DN",
"productCode":"MT"
},
"user":
{
"domain.name":"domain.com",
"loginNam":"john.smith"
}
"pin": "tokenpin"
],
"return": ["id", "serial", "product.name", {"tokenAssignments":[{"elements":["id"]}]}]
}
Response
{
"error":0,
"result":
{
"id": "token id",
"serial": "token serial",
"product.name": "MobileID",
"tokenAssignments": {
"elements": [
{
"id": "token assignment id"
}
]
}
}
}