When/where does that happen? I couldn’t find it.
Anyhow, when this topic loads it has a link element:
<link rel="canonical" href="https://meta.discourse.org/t/get-topic-id-when-the-topic-show-page-loads/155620" />
Maybe you can grab it from there. ![]()