API get_api_key. Get CleanTalk Access key automatically
 
The API "get_api_key()" returns a JSON-string containing various information required for CleanTalk services. API server: https://api.cleantalk.org.
Call required POST params:
- method_name - must be 'get_api_key',
 - email - your e-mail
 - website - URL of your site OR array of URLs
 
Optional POST params:
- product_name - one of CleanTalk products, one of:
 
- 'anti-spam' (default value)
 - 'anti-spam-hosting'
 - 'cure_malware'
 - 'database_api'
 - 'doboard'
 - 'security'
 - 'ssl_certificate'
 - 'uptime_monitoring'
 
API returns JSON string, the list of fields depends on the time between the first call and the subsequent ones :
{"data":{"auth_key":"your_auth_key","password_hash":"your_long_password_hash","user_token":"your_user_token","service_id":your_service_id}}
{"data":{"auth_key":"your_auth_key","user_token":"your_user_token"}}
{"data":{"account_exists":1}}
For array of URLs
{"data":{"account_exists":1,"auth_key":"auth_key_1","websites":{"URL_1":{"hostname":"hostname_1","auth_key":"auth_key_1"},"URL_2":{"hostname":"hostname_2","auth_key":"auth_key_2"},"URL_3":{"hostname":"hostname_3","auth_key":"auth_key_3"}}}}
Response explanation:
- auth_key - Access key for your site to use a CleanTalk product
 - password_hash - hash required for your password recovery
 - user_token - token used to log in to your CleanTalk Control Panel
 - service_id - digital ID of your site in the CleanTalk database
 - websites - array of responses for an array of URLs
 
Examples:
Using Wget:
wget -O- --post-data='method_name=get_api_key&email=<your.email>&website=<your.website>' https://api.cleantalk.org
It would also be interesting
- Cloud Anti-Spam for online web appsSpam protection for online apps or custom-built sites This guide is for app developers who run...
 - CleanTalk Anti-Spam check_message API MethodCleanTalk Anti-Spam "check_message" API method description This method is the best to use on forms that...
 - CleanTalk API methods. Anti-Spam, Block Lists, Dashboard (Outdated)CleanTalk APIs This guide is outdated! Please use this instead https://cleantalk.org/help/api-main CleanTalk...