Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method:/token/create

Table of Contents

Example 1: Create a

...

token and assign the token by user ID

Code Block
languagejs
titleRequest
{
	"attrs":
	[
		"product.id": "pid",
		"user.id": "userid",
		"pin": "tokenpin"
	]
}

...

Code Block
languagejs
titleResponse
{
	"error":0,
	"result":
	{
		"id": "token id" 
	}
}


Example 2: Create a token and assign the token

...

by user name

Code Block
languagejs
titleRequest
{
	"attrs":
	[
		"product":
		{
			"manufacturerCode":"DN",
			"productCode":"MT"
		},
		"user":
		{
			"domain.name":"domain.com",
			"loginNam":"john.smith"
		}
		"pin": "tokenpin"
	]
}

...