PKCE Flow From Console .NET Core App to Web API

I have a SPA app setup with PKCE flow and .NET Core backend. I can login through the Web UI but I would also want to have API Access through a .NET core Console application, is there a way for the user to get a token for their console application? maybe a redirect to the browser or something?

Maybe check out this example, which does exactly that: pops-up a browser to handle the authorize redirect when user and requests/returns back tokens in the console: GitHub - oktadev/pkce-cli: PKCE Command Line