0

Error Code Chart? [ymailphp library]

CODE
YMClientException Object
(
[errorCode:YMClientException:private] => 500
[detail:YMClientException:private] => Bad response from Ymail: HTTP 500, Content-Type: application/json; charset=UTF-8
[message:protected] => Ymail request failed
[string:Exception:private] =>
[code:protected] => 0



I was continuously receiving the error 200 code before this. I'm using the basic example from the ymailphp library written by Michael Curtis - If I can't get this example to work, I don't think I stand much of a chance anywhere else, lol. I was worried the following may be incorrect, any help would be appreciated.

CODE
	    define(OA_CONSUMER_KEY, "correct key here");
define(OA_CONSUMER_SECRET, "correct secret here");
define(OA_CALLBACK_URL, "same page as callback here");

define('REQUEST_TOKEN_COOKIE_NAME', 'rt');
define('ACCESS_TOKEN_COOKIE_NAME', 'at');

by
4 Replies
  • I see that you are using the php sdk. I need more information on the error message. Can you dump the entire response error message and paste it here. Thanks

    --R

    QUOTE (bob_cavezza @ Apr 11 2011, 10:11 PM) <{POST_SNAPBACK}>
    CODE
    YMClientException Object
    (
    [errorCode:YMClientException:private] => 500
    [detail:YMClientException:private] => Bad response from Ymail: HTTP 500, Content-Type: application/json; charset=UTF-8
    [message:protected] => Ymail request failed
    [string:Exception:private] =>
    [code:protected] => 0



    I was continuously receiving the error 200 code before this. I'm using the basic example from the ymailphp library written by Michael Curtis - If I can't get this example to work, I don't think I stand much of a chance anywhere else, lol. I was worried the following may be incorrect, any help would be appreciated.

    CODE
    	    define(OA_CONSUMER_KEY, "correct key here");
    define(OA_CONSUMER_SECRET, "correct secret here");
    define(OA_CALLBACK_URL, "same page as callback here");

    define('REQUEST_TOKEN_COOKIE_NAME', 'rt');
    define('ACCESS_TOKEN_COOKIE_NAME', 'at');
    0
  • Is there a list of error codes available? I fixed this, but I'm working through some more. An error code table would be helpful.
    0
  • Please have a look at the API documentation. Error codes are specific to each API. Would be ideal for others if you let the forum know what the problem was and what did you do to fix it, Thanks

    --R

    QUOTE (Bobby Cavezza @ Apr 18 2011, 08:57 PM) <{POST_SNAPBACK}>
    Is there a list of error codes available? I fixed this, but I'm working through some more. An error code table would be helpful.
    0
    • Jul 15, 2012

    Just in case anyone else looks for this. I was getting "Bad response from Ymail: HTTP 200" and the reason was in ymclient.php on line 45 it was looking for a specific responsetype of "application/json". The api was returning "application/json; charset=UTF-8" which was causing the error. Basically it wasn't matching response type. I just changed to the following

    if(in_array($responseContentType, array("application/json", "application/json; charset=UTF-8")))

    you could also just look for "application/json" in the response type and just match up also. Just thought i would post this as a solution as it took me a while to figure out why the test application didn't work.
    1

Recent Posts

in Yahoo! Mail Web Services API