Get thread row message ID

275 views
Skip to first unread message

Chris Richardson

unread,
Feb 22, 2022, 5:01:08 AM2/22/22
to InboxSDK
Hello,

The `registerThreadRowViewHandler` method gives you access to the thread ID via `getThreadIDIfStableAsync`. However, is it possible to grab the message ID as found in the HTML attribute `data-thread-id`? e.g. #thread-f:xxx|msg-f:xxx

Thanks, Chris

Aleem Mawani

unread,
Feb 22, 2022, 3:47:37 PM2/22/22
to Chris Richardson, InboxSDK
Message view handlers will give you the message id

--
You received this message because you are subscribed to the Google Groups "InboxSDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/57375bd7-315e-432b-8426-b8274c6f3599n%40googlegroups.com.

Chris Cowan

unread,
Feb 22, 2022, 3:54:38 PM2/22/22
to InboxSDK
We don't expose any of the "#thread-f:xxx|msg-f:xxx" style IDs in our APIs. We only expose the "legacy" IDs that are compatible with the Gmail API. I'm very curious what use you have for them. We could add an API if it's generally useful enough, but otherwise you'll need to get that ID from the DOM yourself. (The ThreadRowView class lacks any getElement() method right now but it seems reasonable for us to add to allow this.)

Chris Richardson

unread,
Feb 22, 2022, 4:04:55 PM2/22/22
to InboxSDK
Thanks Chris. It'd be really useful if we could add a `getElement()` method to `ThreadRowView` so that we can grab other data attributes. At the moment, we're using the "msg-f" ID to query the Gmail API to determine the SMTP ID of each message in a user's inbox. We can't use the legacy style IDs are they appear to be thread IDs and are not unique to a particular message.

We're building an email archiving facility and need a unique identifier for each message (but one that carries across multiple inboxes - e.g. when the same email is sent to multiple users). From what we can see, the only way to get the SMTP ID for each message in a list is to query Gmail's API. This data becomes available (in Gmail and via your SDK) when a user views a message, but not when they are browsing an inbox/list.

Thanks again, Chris.

Chris Cowan

unread,
Feb 24, 2022, 1:57:42 PM2/24/22
to InboxSDK
ThreadRowView now has a getElement() method.
Reply all
Reply to author
Forward
0 new messages