Missing or invalid scopes for requested endpoint error thrown when retrieving Master account's funding source in sandbox

Hello,
I am facing the Missing or invalid scopes for requested endpoint error when retrieving Master account’s funding source in sandbox. I want to receive money from customers and so when I am calling API via curl to retrieve Master account’s funding source in sandbox, I am facing the error.

I have found my account’s ID from Funding Sources option from my account and so I am using like this in curl: curl_init(“https://api-sandbox.dwolla.com/accounts/90492ea5-98c9-45e6-8f32-59982b3c48e0/funding-sources?removed=false”);

My curl code is:

$ch2 = curl_init("https://api-sandbox.dwolla.com/accounts/90492ea5-98c9-45e6-8f32-59982b3c48e0/funding-sources?removed=false");
    curl_setopt($ch2, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch2, CURLOPT_HTTPHEADER, array(
                       'Accept: application/vnd.dwolla.v1.hal+json',
                       'Authorization: Bearer mytoken
                       )
     );
    $result2 = curl_exec($ch2);
    $result2 = json_decode($result2);

Where I am doing wrong? Please help.

Hi @symapptest5

To find you account id you have to call the Get root endpoint. Your account id should be in the first href of the account body