# How to programmatically retrieve the external\_id for a topic

**URL:** <https://meta.discourse.org/t/how-to-programmatically-retrieve-the-external-id-for-a-topic/259914>\
**Category:** Development\
**Created:** [March 29, 2023, 10:44pm UTC](https://meta.discourse.org/t/how-to-programmatically-retrieve-the-external-id-for-a-topic/259914 "2023-03-29T22:44:36Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![SeanOSullivan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seanosullivan/32/93924_2.png) [@SeanOSullivan](https://meta.discourse.org/u/SeanOSullivan)\
**Post date:** [March 31, 2023, 6:00am UTC](https://meta.discourse.org/t/how-to-programmatically-retrieve-the-external-id-for-a-topic/259914/8 "2023-03-31T06:00:28Z")

</div>

.. and just like that, it goes from ‘impossible’ to ‘fabulous’ 🙂 .. brilliant, that’s a game-changer for me. It hadn’t occurred to me that the model would be variable, but it makes total sense.

Thanks very kindly, @simon, including for the elegant code snippet!

---

_[View the full topic](https://meta.discourse.org/t/how-to-programmatically-retrieve-the-external-id-for-a-topic/259914)._
