3

I have uploaded a valid mp4 video to twitter, it returns a mediaID and the state is succeeded.

enter image description here

Does anyone know how to use the twitter api to associate the uploaded video to the media library? It keeps saying I am "Unauthorized to use media xxxxx". Already put my userId in the AdditionalOwnerIds for the upload but still doesn't work.

Tried with Postman API, Twurl, or upload by Tweetinvi, still no good.

Twitter documentation

API Endpoint: https://ads-api.twitter.com/3/accounts/:account_id/media_library

enter image description here

tc01
  • 181
  • 4
  • 12
  • Could you post the media upload request? Does it have the correct `additional_owners` parameter set? – osowskit Mar 09 '19 at 17:47

1 Answers1

2

TLDR Use the additional_owners parameters when uploading media for a Twitter Ads account that is not your account as described in this tutorial.

The media upload is separate from the Ads API endpoints -- which are nearly always scoped to an :account_id -- as the media is associated with the current user. As the media is likely associated with your user account, the error indicates that it doesn't belong to the Ad Account's user.

  1. Your application should call GET accounts/:account_id/promotable_users to get the user ID string for the ads account that should use this media.

  2. Pass in the additional_owners parameter for the POST media/upload (INIT) endpoint.

osowskit
  • 5,904
  • 2
  • 29
  • 38