API Example Lost Password Recovery

From InClickAdServer

Password Reset

This API Service Request will initiate a Password Reset to accounts associated to the provided email address.

In the factory User Interface, the Password Reset work flow does not provide a tactile response with regard to locating an account within the system. This is the intended work flow specifically designed for security and privacy of account holders. It is discouraged to provide a response of "No Account Found" or similar.

This API Service Request will not validate the email address provided. It is recommended you perform your own email format validation before performing this API Service Request.

The Code Example

Breaking Down the Code

This require references the local inClick Ad Server deployment configuration files allowing your code to utilize the pre-packaged API Objects as well as the bundled PHPOlait services.


This will include the files that contain the API Objects and Classes needed for this API Service Request.


The $base_url is the URL to your inClick Ad Server deployment, the ad server root URL. For local host API usage, the constant of INCLICK_WEB_URL is defined in the globals.php file referenced earlier. Remote deployments, deployments where the ad server and API Request Location are not on the same server, would change this to the fully qualified URL to the ad server root directory.

The $service_key is one of the the api_service_keys values you created for your ad server. (more information)


This is where we create an instance of the classes needed to create a new advertiser account.


This line processes the API Server Request using the email address provided. The number of results found is available as the $result->getReturnValue() object.

WARNING: The email address you provide to the API is not checked for formatting. Please be sure to validate the email address prior to processing the API Service Request.
NOTICE: For security reasons, you cannot reset the password to the Administrator account using the API or user interface. The Administrator password can only be changed through a direct database query. Please open a support ticket for assistance.

This section of code is provided to give you a visual confirmation of what occurred, or to let you know what error occurred.