Hi Elad,
You can actually dump the response from the server. Mostly you will see
something like:
{"result":null,"error":{"code":"Client.InputInvalid","message":"Submitted ListMessages is of incorrect type: string","detail":null}}
This means that you don't send the right parameters to the Mail API.
You can then output the JSON string you send to the server which looks like
{"method":"ListMessages","params":{"fid":"Inbox","startInfo":0,"numInfo":10}}
If you check the API document:
http://developer.yahoo.com/mail/docs/user_...PCSampleRequestyou can see that the "params" should be an ARRAY. So the correct
request string is:
{"method":"ListMessages","params":[{"fid":"Inbox","startInfo":0,"numInfo":10}]}
Please note the extra "[]" pair after "params".
Therefore you will have to modify your code like this:
$param = new stdclass(); // Empty params attribute
$param->fid = 'Inbox';
$param->startInfo = 0;
$param->numInfo = 10;
$params[] = $param;
$results = $ymc->ListMessages($params,$accessToken);
Please try it and let us know if you still see any issue.
Thanks,
Yu Wang