Skip to main content

Authentication REST API

2.1 /Tokens/ resource

Supported methods:POST
Arguments :UsernameStringRequired
PasswordStringRequired
AgentIdStringRequired
Response Codes :200 OKAuthentication successful
401 Not AuthorisedInvalid Username, password or agent id
Response Body :TokenStringRequired
Since Version :1

The /tokens/ resource allows the creation of new authentication tokens for use with the Collaboration and Provisioning APIs. For an overview of how authentication works in the MindLink API, see section 1.4.The /tokens/ resource supports only the POST method – there is no way to enumerate all tokens. The POST payload must contain three arguments:

Username – the account name of the user wishing to use the API Password – the password for the given account AgentId – the ID of the agent the user wishes to use when accessing the API

On success, the newly generated token will be returned. This will need to be passed to any call made to the Collaboration or Provisioning APIs. Information on the token is available via the /Tokens/{token} resource.The ‘super user’ (configurable using the management tool) may authenticate and access the provisioning service. This can be done using an empty ‘AgentId’.


2.2 /Tokens/{token} resource

Supported methods:GET
Arguments :{token}StringRequired
Response Codes :200 OKToken Exists
400 Bad requestif the token has expired or it doesn't exist
Response Body :Token informationTokenDetailsRequired
Since Version :1

The /Tokens/{token} resource retrieves information about the specified token. No authentication is required in order to access this resource.The resource returns a TokenDetails object, which contains the following members:

Username (string) : the (Windows) username associated with the token

AgentID (string) : the unique Agent ID associated with the token

ExpiresTimestamp (long) : the timestamp at which the token will expire


Sample Code Repository

Sample code can be downloaded from https://github.com/mindlink/api-samples