I tried to get all the media_library under an ad account but somehow some of them were not returned.
I used this endpoint:
https://ads-api.twitter.com/10/accounts/18ce55cmvcb/media_library?with_deleted=true

This media_key can’t be found in the response: 3_1441133703204245511 from the request above but was returned once I use this endpoint:
https://ads-api.twitter.com/10/accounts/18ce55cmvcb/media_library/3_1441133703204245511?with_deleted=true

Why did this happen and how can I retrieve all the media_library under an ad account?

Thanks and Regards,
Nhi.

Hi, any updates here?

Hey @hvn_hcm

Thanks for reaching out! The root cause is due to the fact that the media library endpoints currently don’t accepted a with_deleted parameter, and only return un-deleted items via the GET endpoint. As noted, using the SHOW endpoint (i.e., using the media_key in the API URL) will retrieve both deleted and un-deleted entities.

There isn’t a workaround for this at the moment, but we’ll provide an update if that changes.

Thanks!

Thanks, @imit8me

Sorry for the misinformation question. I just want to retrieve all un-deleted items and the media_key I provided has the field deleted as false so I don’t think it’s a deleted item though.

Regards,
Nhi.