HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Customer.getRequests Api method, sPassword parameter



I am trying to use some of the Api public methods.

they seem to work but I have problems with customer.getRequests. this method need two parameters: sEmail and sPassword.

I guess sEmail should be the email of the customer that have inserted a ticket, while sPassword should be the random six letter string that is appended to the ticket number to have the Access key.

anyway when calling this method and passing these parameters I obtain this error: “Email or password not valid”.

To be safe I copied/pasted both parameters from the result of a call to another Api method, request.get, passing also the AccessKey.

so, for instance, if my ticket Access key is 12345abcdef I’ll call the method this way:

is this the correct way to do it?

I also tried using the full Access key as sPassword:

but I still obtained the error.



Hi, the sPassword parameter isn’t the access key for the request (an access key isn’t valid here as this API method returns all requests for a particular customer :slight_smile: ). Instead, it’s the customer’s portal password.


Hi Andrews, thanks.

our users do not pass through the portal, so I guess I can use this private api method:


anyway, I am having troubles with passing authentication data to Curl using php.

could you provide me some copy and paste sample to use?

many thanks,



Hi Luca,

Why don’t you use the the “” method to pull back all requests based on the criteria you want, i.e. all requests from a particular email address? Otherwise you’d be using two calls - one to get the user’s portal password, and another to get the requests. That is, if I understand what you’re trying to pull back.

I’m afraid I’m not familiar with Curl, although I see a brief example on the KB article below:


thanks Andrew, seem to be more useful.

actually I am just making some random try to help myself understand practically how the whole system work.

the problems I had were with passing authentication credentials to curl.

I’ll copy and paste some php code I successfully use to call the private method just in case someone else has similar problems:

$url = “”;

$curl = curl_init();
curl_setopt($curl, CURLOPT_USERPWD, ‘ mypassword’);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($curl);


Thanks for all the great information guys.

One thing that may be on interest to you both is that we’re currently working on a PHP framework for working with the HelpSpot API. This will make doing so much easier (for PHP users) as it implements all the HTTP components for you, provides an error framework and much more. It’s still very very early, but we hope to have it available in a few months.