Media Upload returning different media_id and media_id_string today


Noticed my implementation broke today and looking more closely I noticed that media_id and media_id_string are different.

{ image: { w: 500, h: 500, image_type: 'image/jpeg' }, media_id: 596476242246946800, media_id_string: '596476242246946817', size: 68421 }

Checked the docs and they should be the same:

{ "media_id": 553656900508606464, "media_id_string": "553656900508606464", "size": 998865, "image": { "w": 2234, "h": 1873, "image_type": "image/jpeg" } }
Tested and media_id_string is the correct value.

Linked from "The validation of media ids failed." Error Code 324

"The validation of media ids failed." Error Code 324

Thanks for reporting this. Let me dig in here.


Hi Jason!

Team got back to me. They pointed me to this post:

Basically, we have the *_id_string/str version for platforms like javascript that don’t like large integers.

Does that help?


Hey Ryan,

Thanks for digging into this. That’s interesting how you generate those IDs, I’m curious to learn more about that. Makes a lot of sense as to why I was getting what seemed to be random results, and why it did work at one point.

It might be helpful to include a note about the differences of those fields on the docs, and how some platforms can generate unexpected results. On the thread linked in my first comment, there’s confusion about how 324 codes are generated, which only added to the troubleshooting difficulty.




Thanks for the feedback. I think we can do a better job of surfacing the snowflake thing; it’s not particular to the media/upload endpoints.

Duly noted. Let me think about it, and glad it’s working now!