The video url in the web site card creation (POST accounts/:account_id/cards) response is mp4 and m3u8, returned randomly
I have two questions.
- Is this behavior a specification or a bug?
- If it is a specification, is there a way to control the returned extensions?
1 Like
Hello,
Thanks for reaching out. Could you share the request/response logs for us to troubleshoot the issue further?
Sorry for the delay.
This is the request
REQUEST Twitter ADS API POST : "/accounts/18ce55eu180/cards" {"name":"test web site","components":[{"media_key":"7_1544261678405406720","type":"MEDIA","media_metadata":{}},{"destination":{"type":"WEBSITE","url":"https://www.google.com/"},"title":"This is Head line Content","type":"DETAILS"}]}
This is the response
{
"request"=>{
"params"=>{
"account_id"=>"18ce55eu180"
}
},
"data"=>{
"name"=>"test web site",
"components"=>[
{
"media_key"=>"7_1544261678405406720",
"media_metadata"=>{
"7_1544261678405406720"=>{
"type"=>"VIDEO",
"url"=>"https://video.twimg.com/ext_tw_video/1544261678405406720/pu/pl/xWmqh_fAIsc9wlCj.m3u8?tag=12&container=fmp4",
"width"=>1920,
"height"=>1080,
"video_duration"=>11225,
"video_aspect_ratio"=>"16:9"
}
},
"type"=>"MEDIA"
},
{
"title"=>"This is Head line Content",
"destination"=>{
"url"=>"https://www.google.com/",
"type"=>"WEBSITE"
},
"type"=>"DETAILS"
}
],
"id"=>"1544261978302316546",
"created_at"=>"2022-07-05T10:08:41Z",
"card_uri"=>"card://1544261978302316546",
"updated_at"=>"2022-07-05T10:08:41Z",
"deleted"=>false,
"card_type"=>"VIDEO_WEBSITE"
}
}
Hello.
Has there been any progress since then?
Hello,
We are currently still researching on this issue. We will update again once the team replies.
2 Likes
Hey,
Quick check, is the format of mp4/m3u8 causing rendering issues or playing of any media? Or it is just the extensions itself?
Hello,
We want to use the returned URL to display the video in the browser.
However, PC browsers do not support the “m3u8” extension, so it cannot be used as is.
So the problem we have is that if the m3u8 is returned, something needs to be done about it.
If the issue of m3u8/mp4 being returned randomly is a Twitter API spec we need to fix our application, and if this is a Twitter API bug we will wait for Twitter to fix it.
Thanks!
Hello,
Thanks for the quick response. Let me check with the team again.
Hey,
So the team got back to me and mentioned that By default the extension for any video upload will be the determined by the video type itself
Hello,
So, You mean, it’s a bug, right?
Because the video used to create it was mp4.But API returns m3u8.
Are there any plans to fix it?
I am still checking with the team. But you can confirm that you uploaded an mp4 but returns m3u8 is that correct?
It should be correct.
I just checked using this endpoint.
https://ads-api.twitter.com/10/accounts/18ce55eu180/media_library/7_1544261678405406720)
It did return the url for the mp4.
Below is the response.
{
"request": {
"params": {
"account_id": "18ce55eu180",
"media_key": "7_1544261678405406720"
}
},
"data": {
"tweeted": false,
"duration": 11225,
"name": null,
"file_name": "Beluga_1657015720",
"description": null,
"media_url": "https://video.twimg.com/ext_tw_video/1544261678405406720/pu/vid/1280x720/zqFXc4rdVh7PXx-M.mp4?tag=12",
"poster_media_key": "3_1544261678405406720",
"media_key": "7_1544261678405406720",
"created_at": "2022-07-05T10:07:29Z",
"media_status": "TRANSCODE_COMPLETED",
"poster_media_url": "https://pbs.twimg.com/ext_tw_video_thumb/1544261678405406720/pu/img/BDxCmUkQIX8KJe89.jpg",
"title": null,
"media_type": "VIDEO",
"aspect_ratio": "16:9",
"updated_at": "2022-07-05T10:08:40Z",
"deleted": false
}
}
Got that. I am checking with the team. In any case if they reply, I will update again.
1 Like
What happened to this?
I am also getting DMs.
And the video format sometimes returns mp4/m3u8.
The problem is that the m3u8 link can’t be fetched via retrieve media endpoint.