"User ### is not authorized to create tweets for user id ###"


#1

Hi! I have developer access to the Ads API. An account has granted access to me (through the Edit Access to account) interface, and I’ve found I"m able to upload media, access their funding metrics, existing campaigns, view existing cards, and create new website cards for them.

However, the one thing I’m trying to do that I get an error for is creating new promoted tweets for them. I get a response that reads “User ### is not authorized to create tweets for user id ###” (where both ###s are the same)

This is strange to me - the account that granted access has selected my account as both the Ad Manager, and now in experimenting, the Account Administrator supertypes. In addition, the “Allow user to create new Promoted-only tweets for use in campaigns” checkbox is checked for my user. And yet, the error above occurs upon hitting the endpoint (which creates a promoted tweet for my own account just fine).

Any ideas or suggestions would be greatly appreciated - thanks!


#2

Hello,

Please confirm that the account ID you are passing to this endpoint is that of the ads account having access, NOT the account ID of the user the account is authorized for. Please let us known if this is the issue, or otherwise post specific details about how you are calling this endpoint.

Thanks,

John


User X is not authorized to create tweets for user id Y
#3

Hi @JBabichJapan - that did the trick. Thank you!


#4

Hi to anybody checking this topic out (from the future!): a way I was able to get this to work in the context of launching a new promoted tweet/card/ad campaign containing the above was to use the client’s account ID and also the “as_user_id” property as described at https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/tweet

Thanks again for your help, @JBabichJapan


#6

where can i get the ‘as_user_id param??’


#7

as_user_id is one of the optional parameters for the POST tweet endpoint on Ads API: https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/tweet

Could you please post more details in a new thread with whatever problem you are having?

Thanks,

John