facebook / facebook-python-business-sdk

Python SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
1.29k stars 639 forks source link

Problem with assigned_ad_accounts API #628

Open Chaitanya1010 opened 1 year ago

Chaitanya1010 commented 1 year ago

Hi all, I'm trying to make a call to the assigned_ad_accounts API, with

fields = [AdAccount.Field.id]
params = {summary: true, limit: 1000}
resp = SystemUser(system_user_id, api=fb_api).get_assigned_ad_accounts(
                        fields=fields,
                        params=params)

I'm getting the error response

 Status:  500
  Response:
    {
      "error": {
        "code": 1,
        "message": "Please reduce the amount of data you're asking for, then retry your request"
      }
    }

I tried with lesser and more limit values but got the same issue in every run. This has been happening over the past 2-3 weeks. I'm currently using v14, but this issue is happening with v15 and v16 too.

However, I'm able to receive a response for this API request successfully from Postman and FB graph API explorer (saved session link), but it's not working with this SDK

Does anyone know why this is happening or having the same problem? Thanks

Chaitanya1010 commented 1 year ago

Update:

When the initial call is made, the graph explorer and the postman are giving successful responses, but when we are using the pagination and querying for the next pages, we are running into the same issue (even with a lesser limit). Please check the saved session here

stcheng commented 1 year ago

@Chaitanya1010 sorry i can't open your saved session here. if possible, could you submit a case through our support channel (https://developers.intern.facebook.com/support/)?