How to get the Device ID from the firmare inside a script?

I am new to particle and I just started a little project with some Photons. I want that when the photon connects to my TCP server it transmits its own Device ID, so that I have a unique key to identify it.
I didn’t find a way to get the Device ID number within the code… I am pretty sure that I am missing something… I know that I cna get the ID of each from the Web IDE easily, but I want each Photon to identify itself sending its own ID without having to code one manually…
Thanks a lot,

Docs is always a good place to start.
See this -


sorry, I have been scrolling that page up an down many times but never found it. May be it is like in the fridge when you’re looking for something that is right in front of you and still you can’t see it :smile:
thanks again