We use API Tokens to authenticate to the 80Legs API. After registering for a plan you should have received an API Token. Your token can be viewed from the “My Account” page on the 80Legs portal. The token allows use of all available credits in your account, so make sure to keep it secret.

The API uses HTTP Basic Auth for authentication. The API Token is used as the username and the password is left blank.

The token can be placed before the domain as in the example below or it can be set in the header. If set in the header the token must be first base64 encoded (with the colon at the end), then passed in as a basic authentication, see example below. Some HTTP libraries (such as the Java library), require that the authentication be set in the appropriate header fields, and throw it out if placed before the domain.

📘

All API calls must be made through HTTPS and authenticated using the API Token. If either is missing the request will fail.

https://<your_api_token>:@api.80legs.com/v3/crawls/<crawl_id>

📘

Replace <your_api_token> with your API token. Make sure to include the following : or the request will fail.

Authentication can also be done through a header:

Authentication: "Basic <your_api_token>:"

📘

Note the space between "Basic" and your API Token. As before, replace <your_api_token> with your API token, and don't forget the trailing :