Hi @andypiper, Im trying to get video url and already built this: https://api.twitter.com/2/tweets/${tweetId}?expansions=author_id,attachments.media_keys&tweet.fields=attachments&user.fields=description&media.fields=url,variants,alt_text,preview_image_url,duration_ms,public_metrics;
But no retreiving video URL
function TWEET(url) {
const tweetId = helpers.tweetIdFromURL(url);
const tweet = helpers.tweet(tweetId);
return tweet.data.text;
Hi @andypiper, Im trying to get video url and already built this:
https://api.twitter.com/2/tweets/${tweetId}?expansions=author_id,attachments.media_keys&tweet.fields=attachments&user.fields=description&media.fields=url,variants,alt_text,preview_image_url,duration_ms,public_metrics;But no retreiving video URL
function TWEET(url) {
const tweetId = helpers.tweetIdFromURL(url);
const tweet = helpers.tweet(tweetId);
return tweet.data.text;
function MEDIA_OF_TWEET(tweetURL) {
const tweetId = helpers.tweetIdFromURL(tweetURL);
const tweet = helpers.tweet(tweetId);
return helpers.lookupMedia(tweet);
Any suggestions?
Is it a native video or is it an ad?
You'll have to ask Twitter for help - you can try twittercommunity.com for example. You will need to provide a Tweet ID. I cannot help you any more.