Logon

Logon returns a token that will be used to authenticate other api calls that require to be authenticated.

There are 6 ways to ‘log in’:

  • With a username and password
  • With an access token
  • Using SAML
  • With AMS username and password
  • With AuthToken
  • With ApiKey
  • Optional: With two-factor authentication

With username (Email) and password.

Input Parameter Type Description
Email* String Account email
Password* String Account password
LocationID* String Unique ID of device
TwoFactorCode (if required) Integer Code generated with the Google Authenticator app
Remember Boolean Optionally return a rember token if allowed (see password policy)
Output Parameter Type Description
Token String Security token

*=required

EXAMPLES

curl -v 'https://example.com/ctrller/api.php?Task=Logon&Email=user@example.com&Password=password&LocationID=56e77cd4-5aa4-4c7b-9045-2c3bc3c514ed'

RESPONSE

<Response>
    <Status>1</Status>
    <Message></Message>
    <Token>85dfbf1f-3533-d0a3-7830-4fc40ce47847</Token>
</Response>

With an access token

Logon with an access token is done like this:

Input Parameter Type Description
AccessToken* String
Password String Only required when the AccessToken is password protected
Output Parameter Type Description
Token String Security token
StorageAPIUrl URL Link to the correct storage server for the fileserver
FileserverName String Name of the fileserver
Path Path
Subject String
Message String
ExpiryDstamp TimeStamp
Sender String FirstName & LastName or Emailaddress of the account that created the AccessToken
ShowSubDirs Boolean Indicates access to subdirs

*=required

EXAMPLE

curl -v 'https://example.com/ctrller/api.php?Task=Logon&AccessToken=49fe57c9-f467-0995-78eb-20444c8c6931'

RESPONSE

<Response>
    <Status>1</Status>
    <Message></Message>
    <Token>255mrbr0bff3ruqocshp37e576</Token>
    <AccessInfo>
        <StorageAPIUrl>https://example.com/storage/api.php</StorageAPIUrl>
        <Email>sender@example.com</Email>
        <FileserverName>nmsa000164</FileserverName>
        <Path>/dir</Path>
        <Subject>subjectmsg</Subject>
        <Sender>Firstname Lastname</Sender>
        <Message>messagetext</Message>
        <AccessType>ReadOnly</AccessType>
        <ExpiryDstamp>2009-10-29 10:46:46</ExpiryDstamp>
    </AccessInfo>
</Response>

In case you log on with an Access Token for a widget you’ll get a response in the following format:

<Response>
    <Status>1</Status>
    <Message></Message>
    <Token>255mrbr0bff3ruqocshp37e576</Token>
    <AccessInfo>
        <StorageAPIUrl>https://storage001.example.com/storage/api.php</StorageAPIUrl>
        <FileserverName>nmsa000164</FileserverName>
        <Path>/dir</Path>
        <Sender>Firstname Lastname</Sender>
        <WebsiteUrl>http://mysite.com</WebsiteUrl>
        <LogoUrl>http://mysite.com/images/mylogo.png</LogoUrl>
    </AccessInfo>
</Response>

With SAML

Input Parameter Type Description
AuthMethod* String must be SAML
Email* String email address to log in using saml
ShortUrl String optional short url, direct link to the IDP
Output Parameter Type Description
Token String Security token

*=required

EXAMPLES

https://example.com/ctrller/api.php?Task=Logon&AuthMethod=SAML&Email=email@example.com

RESPONSE

<Response>
    <Status>1</Status>
    <Message></Message>
    <Token>85dfbf1f-3533-d0a3-7830-4fc40ce47847</Token>
</Response>

With AMS username and password

Input Parameter Type Description
AMSUsername* String Account user/email
AMSPassword* String Account password
Remember Boolean Optionally return a rember token if allowed (see password policy)
Output Parameter Type Description
Token String Security token

*=required

EXAMPLES

curl -v 'https://example.com/ctrller/api.php?Task=Logon&AMSUsername=user@example.com&AMSPassword=password'

RESPONSE

<Response>
  <Status>1</Status>
  <Message>Success</Message>
  <Token>85dfbf1f-3533-d0a3-7830-4fc40ce47847</Token>
</Response>

With AuthToken

Authtoken is an authentication token used in combination with 'Remember Me'

When logging on with email/password or with ams username and password an optional Remember=true can be passed,
when used a token will be returned that can be used for 14 days.

Input Parameter Type Description
AuthToken* String Token
Output Parameter Type Description
Token String Security token

*=required

EXAMPLES

curl -v 'https://example.com/ctrller/api.php?Task=Logon&AuthToken=abb607910c5edca6b4b7eb7fa3721a508117862ca6f10a083a0fdea134ed8cfcec35cc5df0d1c8f81cf11a9551de35677ef6c8d81f852f162edd4d8a3754849b'

RESPONSE

<Response>
    <Status>1</Status>
    <Message></Message>
    <Token>85dfbf1f-3533-d0a3-7830-4fc40ce47847</Token>
</Response>

With ApiKey

Input Parameter Type Description
ApiKey* String Account or Vault api key
Output Parameter Type Description
Token String Security token

*=required

EXAMPLES

    curl -v 'https://example.com/ctrller/api.php?Task=Logon&ApiKey=00bf05cd-5fca-450a-ae11-0f1a31292be8'

RESPONSE

    <Response>
        <Status>1</Status>
        <Message></Message>
        <Token>85dfbf1f-3533-d0a3-7830-4fc40ce47847</Token>
    </Response>

Logon with two-factor authentication

Input Parameter Type Description
Email* String Account email
Password* String Account password
TwoFactorCode* Integer Code generated with the Google Authenticator app
Output Parameter Type Description
Token String Security token

*=required

EXAMPLES

curl -v 'https://example.com/ctrller/api.php?Task=Logon&Email=user@example.com&Password=password&TwoFactorCode=123456'

RESPONSE

<Response>
    <Status>1</Status>
    <Message></Message>
    <Token>85dfbf1f-3533-d0a3-7830-4fc40ce47847</Token>
</Response>