Hi @Ken Exton
In short, it is impossible.
The authorization code can only be obtained by interactively logging in the user in the browser. Refer to a high-level view of the authentication code flow:
If you don't want to interact with users in the browser, then you can try ROPC flow. The ROPC flow doesn't require you to get an authorization code in the browser to redeem an access token, you just need to hardcode your username/password on the backend.
Both of the above authentication flows require user participation to obtain a user token, if your context supports application-only permissions then you can also use the daemon-based client credentials flow.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.