Statuses/oembed of Twitter Rest API v1.1 returns {“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}


#1

I’m trying to retrieve embedded tweets using statuses/oembed , the url sent to the api is https://api.twitter.com/1.1/statuses/oembed/507185938620219395.json but i noticed in the documentation the sent url should be https://api.twitter.com/1.1/statuses/oembed.json?id=507185938620219395

i’m already using search/tweets smoothly, the problem is only with oembed. Below is a sample of what i’m doing

from twitter import *
class TwitterCrawler(object):
# Authenticate twitter API
# Access token, Access token secret, Consumer key, Consumer secret
def __init__(self):
    self.t = Twitter(
                     auth=OAuth(self.accessToken, 
                            self.accessTokenSecret,
                            self.consumerKey, 
                            self.consumerSecret)
                     )

def getEmbeddedTweet(self):
    result =self.t.statuses.oembed(id="507185938620219395")
    return result

the error returned is: TwitterHTTPError Twitter sent status 404 for URL: 1.1/statuses/oembed/567386147631144960.json using parameters:…details: b’{“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}’


#2

Hey there, the library you are using seems to have a bug and uses the wrong oembed endpoint URL. The URL the framework is trying simply does not exist.