Twitter Ads Avatar picture

api

#1

Hello there,

I was wondering if the picture avatar of a twitter ads account was available from the apis. Right now it is not documented (I looked in https://dev.twitter.com/ads/reference/get/accounts/%3Aaccount_id).

Thanks a lot,

Alex


#2

@alex_coppens the Ads API doesn’t have this specifically, but you can easily fetch this from the public Rest API. You can call GET /users/show for the advertiser’s Twitter handle and use the profile_image_url to get to that image.

Related Documentation:
https://dev.twitter.com/rest/reference/get/users/show


#3

@brandonmblack ok I gave it a shot. I got it half-working. I cannot get the screen_name from the accounts endpoint in the Ads API and I need it for 'get/users/show (passing account_id as the user_id is not working). It only works when I use the name given that the name and screen_name are the same. Any suggestions?


#4

You basically have two options:

  1. Explicitly as your user for their Twitter handle when they are going through the flow to authorization your application (eg. in your sign-up process).

  2. There’s no concept of a primary Twitter user for a given ads account, but you could infer the user ID by using the “FULL” promotable user on the account. Only one “FULL” promotable user is allowed on an ads account.

Hope that helps.


#5

Alright, the second option works for us. Would that be a permanent solution or a temporary one?