Hello ,
In the old version I was using the following endspoint call where apiVersoin is 9 or 10
https://ads-api.twitter.com/“+apiVersoin+ “/accounts/”+accountId+”/tweets?tweet_type=PUBLISHED&timeline_type=ALL&count=999&tweet_mode=extended").asStream()
and I was getting the accountid from twitterAdsInstance.getTwitterAdsClient().get(“https://ads-api.twitter.com/“+apiVersoin+”/accounts”).asStream());
and timesline response from
https://ads-api.twitter.com/“+apiVersoin+ “/accounts/”+accountId+”/tweets?tweet_type=PUBLISHED&timeline_type=ALL&count=999&tweet_mode=extended
and the website cards from
https://ads-api.twitter.com/“+apiVersoin+ “/accounts/”+accountId+”/cards/website?sort_by=created_at-desc
and website videos from
https://ads-api.twitter.com/“+apiVersoin+ “/accounts/”+accountId+”/cards/video_website?sort_by=created_at-desc
and was working fine and was getting the right values
Now I am using
The same for accounts and Twieet line
but for the cards and media library I am using the following see this is the same post
Request :-
https://ads-api.twitter.com/“+apiVersoin+ “/accounts/”+accountId+”/cards?include_legacy_cards=true&sort_by=created_at-desc
Response:-
{“coordinates”:null,“retweeted”:false,“name”:“Roll Over Old 401k April 2022”,“conversation_settings”:“EVERYONE”,“source”:“<a href="https://twitter.com" rel="nofollow">Twitter for Advertisers”,“entities”:{“hashtags”:,“symbols”:,“user_mentions”:,“urls”:},“display_text_range”:[0,172],“favorite_count”:21,“in_reply_to_status_id_str”:null,“geo”:null,"id_str":“1516812858138443786”,“in_reply_to_user_id”:null,“truncated”:false,“retweet_count”:4,“scheduled_status”:null,“id”:1516812858138443786,“in_reply_to_status_id”:null,“nullcast”:false,“created_at”:“Wed Apr 20 16:15:41 +0000 2022”,“place”:null,“scheduled_at”:null,“tweet_type”:“PUBLISHED”,“favorited”:false,“card_uri":"card://1516812856938926080”,“full_text”:“Job hopping: it’s what we’ve always done to some degree, but for millennials, it’s occurring more and more. So what should you do with a 401(k) held at a previous employer?”,“lang”:“en”,“contributors”:null,“in_reply_to_screen_name”:null,“in_reply_to_user_id_str”:null,“user”:{“utc_offset”:null,“name”:“comapny”,“friends_count”:47,“screen_name”:“company”,“location”:“Omaha, Nebraska, USA”,“protected”:false,“url”:“https://www.company.com/",“profile_image_url”:“http://pbs.twimg.com/profile_images/1189934351108186112/3iYyfL-j_normal.png”,“profile_background_color”:“183028”,“profile_use_background_image”:true,“is_translator”:false,“geo_enabled”:true,“description”:"Important Disclosures: Social Media Disclosures | TD Ameritrade Official Twitter page of TD Ameritrade. Tweet Client Service: Mon – Sun 8 am – 8 pm ET. 24/7 Help 1-800-669-3900.”,“profile_link_color”:“183028”,“id_str”:“16816021”,“listed_count”:1333,“default_profile_image”:false,“followers_count”:173817,“profile_image_url_https”:“https://pbs.twimg.com/profile_images/1189934351108186112/3iYyfL-j_normal.png",“profile_sidebar_border_color”:“FFFFFF”,“profile_background_image_url”:“http://abs.twimg.com/images/themes/theme1/bg.png”,“favourites_count”:80,“following”:null,“default_profile”:false,“withheld_in_countries”:[],“id”:16816021,“profile_background_tile”:false,“contributors_enabled”:false,“follow_request_sent”:null,“created_at”:"Thu Oct 16 23:14:24 +0000 2008”,“profile_sidebar_fill_color”:“F4F4F4”,“translator_type”:“none”,“lang”:null,“profile_text_color”:“333333”,“notifications”:null,“verified”:true,“time_zone”:null,“profile_banner_url”:“https://pbs.twimg.com/profile_banners/16816021/1572537433",“statuses_count”:77361,“profile_background_image_url_https”:“https://abs.twimg.com/images/themes/theme1/bg.png”,“is_translation_enabled”:false},“tweet_id”:"1516812858138443786”}
Request : -
https://ads-api.twitter.com/“+apiVersoin+ “/accounts/”+accountId+”/media_library?sort_by=created_at-desc
Response :-
{“tweeted”:false,“name”:“trontrhero_tt.jpg”,“file_name”:“trontrhero_tt.jpg”,“media_url”:“https://pbs.twimg.com/media/FQzIUgHXMAMGhPJ.jpg",“original_width”:1400,“original_height”:863,“**media_key”:“*3_1516807429060767747***”,“created_at”:“2022-04-20T15:54:06Z”,“media_status”:“TRANSCODE_COMPLETED”,“media_type”:“IMAGE”,“updated_at”:“2022-04-20T15:54:09Z”,"deleted”:false}
I was Hoping to find a link between the 2 responses and I was thinking the media_key could be link to the card_uri or id_str but nothing related
Thank you,
Ihab