Device name as a webhook variable options

Hi, guys,

I would like to check my understanding in this area.
I have an Electron and I wanted to send its device name in a webhook to a 3rd party service.

I see two ways of doing this:
1- obtaining the device name from the Electron itself as described in the docs here. Since it requires a subscribe and a publish it does not look optimal if I am powering the Electron with a battery. Once obtained, send it in the webhook to my 3rd party service.
2- Calling the Particle rest api to list the devices and parsing the response in my 3rd party service.

Last bit I found about this was done by @jeiden here.

Am I missing a more optimal option 3 by any chance?
Thank you!
Gustavo.

PS: related posts:


Looking for help on this too!

EDIT:

Found answer here:

2 Likes