Authenticating with the server

When connecting to the API service, you must authenticate with the system server before executing any commands. You can authenticate in either of the following ways. 

Authenticating with a user name and password

Issue the login command with the user name and password for a valid system user account as follows:
login userName password

The user name and password are verified against the user account database.

Authenticating with a token

To avoid entering an account password into a script or application, you can use an authentication token instead. Authentication tokens are generated in the console (click System > API Tokens). An authentication token represents a user account and has a unique ID that scripts can use to access the API.

Issue the login command with the authentication token as follows:
login 4e666e90-e838-4d22-b08b-4bd958f09a97

This method lets the script authenticate as the user represented by the token and to access the system with those permissions.

Note

If you are using Active Directory or LDAP for user accounts, the specified user must log into the console for the account to be considered a valid user account.

In the console, you can create a token and set it to expire automatically at a certain date, you can disable it, or you can revoke it.

To create an authentication token

  1. Click the System tab.
  2. From the Manage menu on the left, select API Tokens.
  3. On the right after the list of existing tokens, click New Token.
  4. From the User menu, select the user account to use for API requests.
  5. For Expiration Date, click the Show Calendar icon and select the date when the token should expire.
  6. For Expiration Time, select the time when the token should expire.
  7. Click Create to create the API token.
    The new token appears in the list of API tokens.
Was this page helpful? Yes No Submitting... Thank you

Comments