LingoHub offers two authentication methods with our API:

  1. Token Authentication
  2. HTTP Authentication

The two methods of authentication are supported equally. If you wish to change your authentication details (username, email, password, token) you can do so on your Account Settings page.

Token Authentication

You can add the URL parameter ‘auth_token’ to your request for authentication. You can find your API token value your API on your Account Settings page.

curl -X GET

HTTP Authentication

HTTP supports the use of several authentication mechanisms to control access to pages and other resources. These mechanisms are all based around the use of the 401 status code and the WWW-Authenticate response header. The client sends the username and password as unencrypted, base64-encoded text. Because it is unencrypted, it should only be used with HTTPS, as the password can be easily captured and reused over HTTP.
Luckily, LingoHub encrypts all communication with SSL.

curl -X GET -u

HTTP Status Codes

For each request LingoHub API tries to return suitable HTTP status codes. Response codes for the REST API can be suppressed.

  • 200 OK: Success!
  • 304 Not Modified: No new data was found.
  • 400 Bad Request: Your request was not valid. There will be an explanatory error message. This is the status code; during rate limiting it will be returned
  • 401 Unauthorized: There are missing or incorrect authentication credentials.
  • 403 Forbidden: Your request was understood, but it has been refused. There will be an explanatory error message.This code is used when requests are being refused due to update limits.
  • 404 Not Found: The URI requested is not valid or the requested resource, a user for example, does not exist.
  • 406 Not Acceptable: If an invalid format is specified in the request the search API will return this code.
  • 500 Internal Server Error: Please inform the LingoHub Support team who will investigate as something is damaged.

Error Messages

When the LingoHub API returns error messages, it does so in your requested format. For example, an error from a JSON method might look like this:

 "error": "The 'page_size' parameter must be between 1 and 100 but was -1"

Request Rate Limiting

To protect LingoHub from abuse the API usage is rate-limited, with additional fair use limits.

Get started today
Try LingoHub for free