How to extract an interface ID?

All codegens include the package ID where necessary, and make it so you can exercise choices without referring to any string IDs directly. If your language doesn’t have a Daml codegen, you can use inspect-jar as mentioned here.