PKCE Flow From Console .NET Core App

Do you need to have user scoped tokens? If not, and you just need to call the endpoints, you can look into using Client Credentials flow to generate these tokens: the only call that’s required for this flow is a call to the /token endpoint with the client ID/secret (you may need a separate application to do this in Okta)

Are you looking to just test your integration? One thing you can take out is this pkce-cli tool our Evangelism team made to lets you pass in your environment variables and requested scopes so that you can get a token returned. Note that the browser is still used in this flow (to handle your Okta session and request the authorization code).

There are ways to get user scoped tokens via command line, but these user scopes flows are usually handled in a browser and there are some limitations to doing it purely server-side. Main limitation is that, because primary authentication is involved, this will only work with local Okta users (they have a password in Okta and are not Federated). If this set up interests you, check out Dragos’ advice in this thread.