Account cannot create tweet on behalf of handle it has access to


#1

Hi,

I am having a problem where an advertiser account has access to a certain handle, but is experiencing a permission error when trying to create tweet on behalf of the handle.

<=== [2017-02-13 18:16:19 +0000 :: ox5kyn56k :: dm6x :: 1175047837] twurl -H ads-api.twitter.com -X GET "/1/accounts/18ce5400aby/promotable_users"
===> [2017-02-13 18:16:20 +0000 :: ox5kyn56k :: dm6x :: 200 OK :: 0.362s :: 1998/2000 (…888s)] {"request":{"params":{"account_id":"18ce5400aby"}},"data":[{"user_id":"187965563","id":"7y046","account_id":"18ce5400aby","created_at":"2015-08-11T01:38:33Z","updated_at":"2015-08-11T01:38:33Z","deleted":false,"promotable_user_type":"FULL"}],"data_type":"promotable_user","total_count":1,"next_cursor":null}

Any help would be appreciated. Thanks!

Account ID: 18ce5400aby
User ID to create tweet on behalf: 187965563

Example Request:

 <=== [2017-02-13 18:24:04 +0000 :: ov3nljj3c :: j461 :: 1175047837] twurl -H ads-api.twitter.com -X POST -d "place_id=&nullcast=true&as_user_id=187965563&trim_user=false&text=Place+"Come+and+Discover+the+home+for+ambitious+life+science+businesses.+http://cards.twitter.cm/cards/18ce5400aby/3bj3x"+in+the+tweet+box&status=Place+"Come+and+Discover+the+home+for+ambitious+life+science+businesses.+http://cards.twitter.cm/cards/18ce5400aby/3bj3x"+in+the+tweet+box" "/1/accounts/18ce5400aby/tweet"

===> [2017-02-13 18:24:04 +0000 :: ov3nljj3c :: j461 :: 401 Unauthorized :: 0.281s :: 300/300 (…60s)] {"errors":[{"code":"UNAUTHORIZED_ACCESS","message":"User 1175047837 is not authorized to create tweets for user id 187965563"}],"request":{"params":{"status":"Place \"Come and Discover the home for ambitious life science businesses. http:\/\/cards.twitter.cm\/cards\/18ce5400aby\/3bj3x\" in the tweet box","trim_user":false,"as_user_id":187965563,"account_id":"18ce5400aby"}}}

#2

Hey @etam

Just to clarify here, the Ads account id mentioned here maps to the @business_bham handle, and the User ID also maps to the @business_bham handle as well. In this case, I’m not sure exactly why you’re using the as_user_id param?

Would be great to get some more context here.

Thanks!


#3

The @business_bham handle is not the primary handle of the ad account id though, will that cause a problem?


#4

Hey @etam, I dont think that should cause any issues. Have you tried using the POST promoted_tweets endpoint directly?


#5

This issue is resolved (I think) as the owner of the handle @business_bham has granted access on Twitter to the ad account to promote tweets. Makes me wonder though because there is no obvious way to tell what happened by looking at the promotable users relationship