So video is uploaded to upload.twitter.com using user 772368 and put additional_owners 702402412854771712.
https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload
so as I tested with the token for both account 772368 and 702402412854771712
twurl -H upload.twitter.com "/1.1/media/upload.json?command=STATUS&media_id=1019498255967637505"
{
"media_id": 1019498255967637505,
"media_id_string": "1019498255967637505",
"media_key": "13_1019498255967637505",
"size": 5064394,
"expires_after_secs": 1215511,
"video": {
"video_type": "video\/mp4"
},
"processing_info": {
"state": "succeeded",
"progress_percent": 100
}
}
So this is fine as I manage to upload to upload.twitter.com and verify with both token that I manage to retrieve the media_id just fine.
Then, as I wanted to create a video website card, I had to make a POST call to the ads-api.twitter.com using the media_id.
https://developer.twitter.com/en/docs/ads/creatives/api-reference/videos.html
So since both user has its own adaccount, 772368 is 18ce53ymmtp and 702402412854771712 is 18ce54ahyak, so I had to make 2 separate POST call to the videos endpoint of the ads api.
Using both account token separately I make below call.
//18ce54ahyak 702402412854771712
twurl -H ads-api.twitter.com "/3/accounts/18ce54ahyak/videos" -d "video_media_id=1019498255967637505"
{
"data": {
"id": "13_1019498255967637505"
},
"request": {
"params": {
"video_media_id": 1019498255967637505,
"account_id": "18ce54ahyak"
}
}
}
//18ce53ymmtp 772368
twurl -H ads-api.twitter.com "/3/accounts/18ce53ymmtp/videos" -d "video_media_id=1019498255967637505"
{
"data": {
"id": "13_1019498255967637505"
},
"request": {
"params": {
"video_media_id": 1019498255967637505,
"account_id": "18ce53ymmtp"
}
}
}
As can be seen, both separate call with their own account token return a successful id 13_1019498255967637505. So here is where it gets confusing
Making a get call with 18ce53ymmtp token and 13_1019498255967637505, I managed to retrieve the id
twurl -H ads-api.twitter.com "/3/accounts/18ce53ymmtp/videos/13_1019498255967637505"
{
"data": {
"tweeted": false,
"ready_to_tweet": true,
"duration": 60067,
"reasons_not_servable": [],
"description": null,
"preview_url": "https:\/\/video.twimg.com\/amplify_video\/1019498255967637505\/vid\/480x480\/L5Yrtj0u4loE9Rbg.mp4?tag=3",
"id": "13_1019498255967637505",
"poster_url": "https:\/\/pbs.twimg.com\/amplify_video_thumb\/1019498255967637505\/img\/ZOrMe471WdyFlyJ9.jpg",
"media_key": "13_1019498255967637505",
"created_at": "2018-07-18T08:25:00Z",
"title": null,
"aspect_ratio": "1:1",
"updated_at": "2018-07-19T06:57:14Z",
"deleted": false
},
"request": {
"params": {
"video_id": "13_1019498255967637505",
"account_id": "18ce53ymmtp"
}
}
}
But, making a get call with 18ce54ahyak token and 13_1019498255967637505, I dont managed to retrieve the id
twurl -H ads-api.twitter.com "/3/accounts/18ce54ahyak/videos/13_1019498255967637505"
{
"errors": [{
"code": "NOT_FOUND",
"message": "13_1019498255967637505 was not found for Account 18ce54ahyak",
"parameter": "video_id"
}],
"request": {
"params": {
"video_id": "13_1019498255967637505",
"account_id": "18ce54ahyak"
}
}
}
Is there something wrong in the flow above? Or is this a problem with Twitter?
So my problem arise from uploading a video to an account, then share it.
Then upload to ad account of both account. But cant get to view the result for both ad account.
Will someone help?