Search code examples
yodlee

Yodlee API Account/Summary/all returning body with empty errors array


Thanks for looking at this question,

Hitting up https://rest.developer.yodlee.com/services/srest/restserver/v1.0/account/summary/all

with the cobSessionToken and the userSessionToken returns a body response with an empty error array. ie

$response  = array("body"=>array("error"=>array(0=>"")));

The account is still in testing mode, I was wondering if this API resource worked while in sandbox mode?

I am trying to obtain the list of account that the user has added.

Thanks in advance.

EDIT

when trying to force the JSON response, you need to be quite fussy about the headers...

In PHP:

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        "Content-Type: application/json",
        "Accept: application/json"
    ));

works, whereas:

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        "Content-Type : application/json",
        "Accept : application/json"
    ));

does not.


Solution

  • This API do work in sandbox mode, for testing purpose you can append the cobSessionToken & userSessionToken in the URL itself. i.e. like

    https://rest.developer.yodlee.com/services/srest/restserver/v1.0/account/summary/all​?cobSessionToken ="Value"&userSessionToken="value".

    Note that this API is using GET method while rest of the APIs are using POST method of HTTP. While, if you are using Site Based aggregation then you should use getAllSiteAccounts API.