How would I best go about accessing a specific page from an outside program I develop myself (probably Delphi-isch) if that Contao page is protected? Should I act as if I was a normal user; request a login form, submit login data, and within that session do what I need to. Or are there established, secure, ways to handle that, already in place?

What I need to get is data (Contao generated XML) that should not be publicly available, but downloaded automatically. So I am looking for the best pratice to that purpose.