You will need an account to get an API key. If you are not yet a user, sign up for a free account on our homepage. Follow the instructions and become a user so you can start using everything we have to offer.
You need a key to start working with API. You can obtain it in 2 ways:
You can find the key in your account drop-down menu - API Keys section. To get there:
It will show a list of API keys.
Choose a valid (active) key, which you will use in your application to work with our API. If the list does not contain any keys, you can create a new one by clicking on the "Add a key" button.
By using the login() function and inputting your username and password, you can obtain a valid key as well. If your account is not associated with a key or all keys are inactive, a new valid key will be created. For more information about using this function, please see "Search for API key".
Below, is a simple PHP example, which demonstrates how to find out if the key is valid.
ping(); if ($api->errorCode) { echo "There was an error!\n"; echo "Code: " . $api->errorCode . "\n"; echo "Message: " . $api->errorMessage . "\n"; } else { print_r($response); }
3rd line shows your active API key as input.
4th line, API instance is created which you can later use to refer to our system.
5th line, an API function which checks the key is executed (see also Ping).
7th line checks whether or not an error has occurred while executing the ping () function. If there has been an error, then lines 9 and 10 show the error code and description to the user.
12th line shows the result obtained by the function if no error has occurred. If the API key is valid, you will get a message saying, "Everything is ok!"