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

**URL:** <https://discuss.dwolla.com/t/missing-or-invalid-scopes-for-requested-endpoint-error-thrown-when-retrieving-master-accounts-funding-source-in-sandbox/7147>\
**Category:** Funding Sources\
**Created:** [June 2, 2021, 2:14pm UTC](https://discuss.dwolla.com/t/missing-or-invalid-scopes-for-requested-endpoint-error-thrown-when-retrieving-master-accounts-funding-source-in-sandbox/7147 "2021-06-02T14:14:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![symapptest5](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@symapptest5](https://discuss.dwolla.com/u/symapptest5)\
**Post date:** [June 2, 2021, 2:14pm UTC](https://discuss.dwolla.com/t/missing-or-invalid-scopes-for-requested-endpoint-error-thrown-when-retrieving-master-accounts-funding-source-in-sandbox/7147/1 "2021-06-02T14:14:55Z")

</div>

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](https://api-sandbox.dwolla.com/accounts/90492ea5-98c9-45e6-8f32-59982b3c48e0/funding-sources?removed=false)”);

My curl code is:

```auto
$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.

---

<div class="post-metadata">

**Author:** ![kmoreira](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/kmoreira/32/2718_2.png) [@kmoreira](https://discuss.dwolla.com/u/kmoreira)\
**Post date:** [June 2, 2021, 3:49pm UTC](https://discuss.dwolla.com/t/missing-or-invalid-scopes-for-requested-endpoint-error-thrown-when-retrieving-master-accounts-funding-source-in-sandbox/7147/2 "2021-06-02T15:49:57Z")

</div>

Hi @symapptest5

To find you account id you have to call the [Get root](https://docs.dwolla.com/#root) endpoint. Your account id should be in the first href of the account body
