Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gmail API does not support new thread Ids?

Tags:

gmail-api

Conversations / threads have different Ids in old and new UIs, but it looks that Gmail API works only with old Ids?

If so, is it possible to get old conversation / thread id from new and vice versa?

Or Google is going to release Gmail API v2 sometime?

I tried to use gmail-compose-encoder.js. It is possible to decode FMfcgxvzLhhSPCtzSXwHlfFgGQtTjVKn to thread-f:1617567580158230396 and then convert number part to hex and you get 1672c124d784ff7c, which is correct answer. But what about LXphbRLrghxkrJpTdcKgWlWJwXwczvLXzkKNrRlBxxB, which decodes to thread-a:mmiai-r7943408968338036837? How can I convert this to 167084ad8beabc6b?

I did some Gmail app debugging and found that this new and legacy thread ids mapping is performed in the back-end, which means that probably there is some persistence layer involved.

like image 559
Donatas Lučiūnas Avatar asked Sep 11 '25 10:09

Donatas Lučiūnas


1 Answers

In the new Gmail version, the id available in the address bar is an encoded value. You can get the thread id from the HTML. Try searching "data-legacy-thread-id" in the HTML elements.

Or you can find it by running JavaScript code in the console:

document.querySelector('[data-legacy-thread-id]').getAttribute('data-legacy-thread-id')
like image 109
Arun D Avatar answered Sep 16 '25 08:09

Arun D