A client was having problems in our client app while trying to attach a big image (in dimentions it was 9000x6000) to their tweet. The error read:

“Your media IDs are invalid.” or “ApiResponseError: Request failed with code 400 - Invalid Request: One or more parameters to your request was invalid.”, here we were using the Twitter API V2 tweet endpoint to post and could not figure out what was happening since the payload was fine.

While debugging I tried to upload and post the same image, but this time using the V1 API and the correct error showed up.

“ApiResponseError: Request failed with code 400 - Image dimensions must be >= 4x4 and <= 8192x8192 (Twitter code 324)”

So it seems there’s an inconsistency in the error messages when going above the image limits and posting a tweet between V1 and V2, V1 returning the correct message.

image


image

Here I’m using the twitter-api-v2 node package to test.