login

login

Methods

(static) user(params, cb)

Source:

Logs in the user and acquires an api key. If run from the command line and no email or password option is specified the user is prompted to enter them. Note: the api key is cached in the user's home directory in ~/.paperspace/config.json. You can execute paperspace logout to clear the cached api key. An optional apiToken parameter may also be specified; if specified, an API token with that name must already exist in the user's account.

Examples
paperspace.login.user({
  email: 'user@domain.com',
  password: 'secretpw',
  apiToken: 'API token', // optional; if specified, an API token with that name must already exist in the user's account
}, function(err, res) {
  // handle error or result
});
$ paperspace login --email user@mail.com --password "secretpw" --apiToken "API token"
# HTTP request:
https://api.paperspace.io
POST /apiToken/createPublic
# Returns 200 on success
Parameters:
Name Type Description
params object

Login user parameters

Properties
Name Type Attributes Description
email string

Email address of the paperspace user to log in

password string

Password for the specified email address

apiToken string <optional>

Optional name of an existing API token for the user's account

cb function

Node-style error-first callback function