API Tokens

In order to use the Loadmill REST API or our node module and CLI, you will need to generate an API Token.

Generate a Token

API tokens can be generated via Account Settings > Security: enter a description for the token's intended usage and click generate.

You will be given an arbitrary string of characters that will be shown to you only once - this is your API token.

Use a Token

Tokens may be used in one of three ways:

  1. Passed in the options object to the loadmill client, e.g. require('loadmill')({token: "ewszIIzEDIeORLwTSrcEvrKKEWQeR9yzQqyCCKlK"})

  2. Given as a basic authentication username with a blank password, e.g. https://ewszIIzEDIeORLwTSrcEvrKKEWQeR9yzQqyCCKlK@www.loadmill.com/api/tests

  3. Given in an Authorization HTTP header as a bearer token, e.g. Authorization: Bearer ewszIIzEDIeORLwTSrcEvrKKEWQeR9yzQqyCCKlK

Protecting Tokens

An API token enables its bearer to create and run load tests with your account. You can do almost anything you can do in our web interface using tokens, except changing your password, making payments and generating more tokens.

Therefore, you should keep your token as safe as you can from untrusted third parties. If you suspect it may have been compromised, you may revoke the token via Account Settings > Security and generate a new one.