[Update: I have added some more details about a “non-standard” setup process for this client. Please see at the bottom]
Hi, we have a Twitter app that has been running mostly without issues for a while. Today we’re getting an error for a client account, which seems not to be an issue for other accounts.
Trying to create PromotedOnlyTweets:
POST https://ads-api.twitter.com/1/accounts/18ce54km581/tweet
source=CMP&as_user_id=337853585&tweet_mode=extended&trim_user=true&status=FooBar
We get back:
{"errors":[{"code":"UNAUTHORIZED_ACCESS","message":"User 11673252 is not authorized to create tweets for user id 337853585"}],"request":{"params":{"as_user_id":337853585,"tweet_mode":"extended","account_id":"18ce54km581","trim_user":true,"status":"FooBar"}}}
If I fetch the permissions for this account, we can clearly see that 11673252 has ACCOUNT_ADMIN access to account 18ce54km581:
twurl -t -H ads-api.twitter.com "/1/accounts/18ce54km581/authenticated_user_access"
{
"data": {
"user_id": 11673252,
"permissions": [
"ACCOUNT_ADMIN"
]
},
"request": {
"params": {
"account_id": "18ce54km581"
}
},
"data_type": "user_access"
}
I have checked various other similar links like https://twittercommunity.com/t/user-xxxx-is-not-authorized-to-create-tweets-for-user-id-yyyyy/73756 and https://twittercommunity.com/t/user-is-not-authorized-to-create-tweets-for-user-id/38982/2 but I believe we’re doing things (passing as_user_id of the target account, and including the target account’s ID in the request URL) correctly on our side.
As I mentioned, this seems to not be an issue for other clients—we can create PromotedOnlyTweets just fine. How can I move forward with this?
UPDATE:
I’m including the email from Twitter support provided to one of our account managers when setting up this account:
Please request your client to grant you Administrator Access to the new Ads account with the word “New” at the end of their new ads account (ID 18ce54km581).
This level of access will allow you to add a payment method and begin creating campaigns on the Ads account.
With your Client’s permission, you can then change your client’s access level to the new Ads account from ‘Account Administrator’ to ‘Ad Manager’. Doing this allows your client to still view the campaign data but they will not have access to your payment method and billing history.
Please note that both accounts (your own and your clients) must have a valid funding source in order for this checkbox to appear. If you have questions about this feature, please write back in and we will continue to help troubleshoot.
I’m still unclear how to proceed with this in terms of the requests and params we need to send in order to create Promoted Tweets on their behalf.