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
- How the CleanTalk Anti-Spam API Works. API Main HelpAPI Main Help Method "check_newuser" Method "check_message" Send_feedback Built-In...
- Spam Check API - API Method spam_checkAPI Method "spam_check" Common description Method's get parameters Response Explanation Multiple...
- CleanTalk API methodsCleanTalk APIs CleanTalk provides API services that enable you to integrate CleanTalk Anti-Spam functionality...