Caught in limbo between suspended and not suspended?

authorization
support
api

#1

Hi. I’m in the midsts of developing a bot.

I’m trying to upload pictures via the Twitter REST API, and it returns error:
{ message: 'The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.’, code: 64 }

From https://dev.twitter.com/overview/api/response-codes I saw this:

Code - Text
64 - Your account is suspended and is not permitted to access this feature

So I thought I’d read more about it and found this post: https://support.twitter.com/articles/72585

But the thing is, neither “Suspended application” nor “Read-only application” pops up under the icon for my app.
So I thought I’d ask for guidance from you Twitter staff people. Am I “shadow” suspended? Or is it on your end, sending me the wrong error code?


#2

Can you explain which endpoint you are calling, and/or provide a code sample? Something sounds odd here. I’m not sure the suspended account message is the correct one.


#3

Im using this library https://github.com/desmondmorris/node-twitter, and I’m calling endpoint media/create. Here’s a snippet:

T.post(“media/create”, {
media: fs.readFileSync(“816682901450485800.jpg”)
})
.then(media => T.post(“statuses/update”, {
status: “Testing uploading images!”,
media_ids: media.media_id_string
}))
.catch(err => console.log(Err: ${err}, JSON-stringified: ${JSON.stringify(err,null,2)}))


#4

There is no media/create endpoint. There’s media/upload, and there’s media/metadata/create (the latter is used for accessibility text). You may find our large video upload sample useful (it’s in Python, but should be straightforward to follow).

I believe the error is a misnomer returned in the case where an endpoint doesn’t have proper routing setup. That’s confusing, and I apologise for that. I’ll definitely make a note to let the media API team know about this.