Authentication and Login
The CLI Application supports logging into the system with your username and password (and two-factor authentication, if enabled) or by providing your API key.
Password Authentication
The CLI App will prompt you for your site name, username and password when you use it. These will be remembered until you logout or your session expires.
To pre-configure the CLI App with a specific username and password, you can provide the CLI App with information about your Files.com account:
When prompted, enter your password.
If your site has a Custom Domain configured, and you wish to connect to it rather than using the files.com custom subdomain, then you can specify the fully qualified domain name (FDQN) with the --endpoint
flag:
Once you've specified your subdomain or endpoint information and username, you do not need to specify it again for subsequent uses of the CLI App.
For later uses, you can login using the following command, which will prompt you for your password:
If your account requires Two-Factor Authentication, you will be prompted for the second factor after you submit your password. Once you are logged in, subsequent uses of the CLI App will perform those actions using your credentials and permissions until you log out.
API Key Authentication
When using an API Key with the CLI App, supply the API Key information on the command line using the --api-key option:
Using an API Key to authenticate will not trigger a Two-Factor Authentication challenge, even if you normally require one to log into the web interface.
Logging Out
Your login session will expire automatically after a period of time. The CLI App will expire your session after 6 hours or your session will expire based on the settings of your authentication system, whichever is sooner.
To manually log out of your session, use: