How to Create an Account
Navigate to the Piloterr Dashboard and simply follow the steps to log in or create a new account.
Retrieving a Token
After you’ve logged in to the dashboard, follow these steps to get a token:
- Click API Keys.
- Select New.
- Assign a name for the token. This helps in future referencing. You can also add notes to describe its use-case, then select Save.
A new token will be displayed in text format with a copy to clipboard button. Use this button to copy the token and secure it in a safe place.
Remember that you can view the logs and track the number of requests made on the dashboard.
Testing the Token
Once you have your token, you can test it using the Terminal. Set up the environment by entering and executing the following command. Replace
<TOKEN> with the token you’ve copied from the Piloterr dashboard:
This step eliminates the need to copy and paste the token each time it’s in use. You are now ready to make a call to the Piloterr Usage service. Use the following command to proceed:
curl -H "x-api-key: $PILOTERR_TOKEN" https://piloterr.com/api/usage | jq .
The response should look like this:
This command will return the number of remaining requests under your token.
Keep in mind that most examples in this documentation assume that you have set the
Congratulations! You have successfully authenticated with the Piloterr API using a generated token.