Kode: Get Widget ID

I'd like to get a unique ID for each widget. The number that is used at the path /data/data/org.kustom.widget/app_config would be perfect, but any other unique and static ID would work as well. I do have root access, but I'd prefer a non-root way to share Komponents it more easily.

Is there a Kode to get a unique ID? Alternativly: Is there a workaround?