Method:/token/createExample 1 Anchor |
---|
example1 | example1Example 1: Create a token and assign the token by user ID
Code Block |
---|
language | js |
---|
title | ParametersRequest |
---|
|
{
"attrs":
[
"product.id": "pid",
"user.id": "userid",
"pin": "tokenpin"
]
} |
...
Code Block |
---|
|
{
"error":0,
"result":
{
"id": "token id"
}
} |
Example 2
...
: Create a token and assign the token by user name
...
Code Block |
---|
language | js |
---|
title | ParametersRequest |
---|
|
{
"attrs":
[
"product":
{
"manufacturerCode":"DN",
"productCode":"MT"
},
"user":
{
"domain.name":"domain.com",
"loginNam":"john.smith"
}
"pin": "tokenpin"
]
} |
...
Code Block |
---|
|
{
"error":0,
"result":
{
"id": "token id"
}
} |
Example 3
...
: Create a token and assign the token, and get the token assignment ID
...
Code Block |
---|
language | js |
---|
title | ParametersRequest |
---|
|
{
"attrs":
[
"product":
{
"manufacturerCode":"DN",
"productCode":"MT"
},
"user":
{
"domain.name":"domain.com",
"loginNam":"john.smith"
}
"pin": "tokenpin"
],
"return": ["id", "serial", "product.name", {"tokenAssignments":[{"elements":["id"]}]}]
} |
...