Log into a website with user&pass and then return a file link from that page

It is a bit hard for anyone to recommend something when the request is so vague as to what exactly needs to be accomplished.

It may not be possible for your needs, but there may be a way with key chain to support this.

E.g.

https://www.reddit.com/r/shortcuts/comments/9umnee/how_to_use_shortcuts_for_automatic_login

https://www.reddit.com/r/shortcuts/comments/9smog4/media_grabber_auto_login/

Or with a separate oauth proxy.

E.g.