API:Api-troubleshooting

From InClickAdServer

Contents

Troubleshooting the API

Check your Logs

The first place to check is your Apache error log (or, if you have display_errors in your php.ini file set to On, then an on-screen message would appear). This will show any critical include errors that you may have missed. This will also tell you if there were any fatal PHP errors that prevented the script from loading.

Log Entry Example 1

The error entry below indicates that the INCLICK_EXTERNAL_CLASSES_DIR constant has not been defined correctly in your test API code, or the API tree was not copied to the specified location correctly.

Log Entry Example 2

This would indicate that on the server side, the PHPOLAIT_DIR constant was not defined correctly in the globals_custom.php file.

Typical Error Messages

No security key list was defined on the server

API Error Response:


Cause: You have not defined an API Service Key.
Solution: Create an API service key and add it to the globals_custom.php file. More information on this can be found here.

JSON-RPC call failed

API Error Response:

Cause: The API was unable to communicate with the ad server.
Solution 1: Be sure you have defined the $base_url correctly.
Solution 2: Verify that nothing is blocking access to $base_url/services/campaign_manager.php.
Solution 3: Make sure that the $base_url is accessible from the host system. In many cases, we have found that the hostname is simply not resolving from where the API request is being made, local or remote.

Unknown Error

API Error Response:

Cause: Licensing issue with your deployment. Solution: Please verify that your account is in good standing with us and that the Process Manager is running. To verify if the Process Manager is running correctly, log into your deployment as an administrator and view the Service Status report.