Service Providers
Though originally created for use with the
Akismet service, the
Akismet API is also used by other spam-filtering services.
Services_Akismet2 works with any service that uses the
Akismet API. To use Services_Akismet2 with other
spam-filtering service providers, specify the API server in either the
constructor,
or by using the
setConfig()
method.
For example:
Popular spam-filtering service providers using the Akismet API include:
API Keys
All requests using the Akismet API must be verified using an API key. The
API key is usually tied to a particular website and ensures the user is
allowed to use the service (which is not free to provide). Most service
providers offer API keys free of charge for personal or low-volume use, and
offer licensing for commercial or high-volume applications.
Note:
API keys are specific to a particular service provider. If you switch
spam-filtering service providers, you will need to acquire an API key for
the particular service.
The format of the API key may vary between service providers. The API key
itself is specified in the constructor. A
Services_Akismet2_InvalidApiKeyException
will be thrown when a request is made using an invalid API key.
Testing Your API Key
After you have acquired an API key, you may want to test it. A comment with
the author set to viagra-test-123 should always be
detected as spam, so it is a good way to make sure things are working
properly.