How to get the media list those have been upload?


#1

We know that media could be uploaded by POST media/upload,
but how to get them, is there a API for it?


#2

Media uploaded with POST media/upload is transiant until it’s attached to a status with POST statuses/update. There is not an API to list that media. Once it’s tweeted you can use GET statuses/users_timeline to get a users tweets. You’ll have to get all the tweets and then filter locally for the ones with media.


#3

@abraham
Thanks for the quick reply.

One more question,
Is there any API used to get the media list uploaded at Ads UI -> Creative -> Media?


#4

This looks like what you are looking for.

https://developer.twitter.com/en/docs/ads/creatives/api-reference/account-media


#5

@abraham

Yes, I have tried that,
but get nothing even I have uploaded a lot of media at Ads UI -> Creative -> Media.

I tried a lot and found that the medias could be get by GET accounts/:account_id/account_media
only if I use POST accounts/:account_id/account_media to associate media with my account in advance.

But I don’t know the media_ids of which I have uploaded at Ads UI -> Creative -> Media.
So GET accounts/:account_id/account_media may not what I want.
Do you have any other ideas?

Thanks in advance.


#6

I’m not very familiar with the Ads API so all I can do is point you towards the documentation.