We have used the API of some organization for some time, but now they are starting to use OAuth2 for authentication. Their API is completely used programmatically by our application. So now we have to authenticate with OAuth2 so we can use their API again.
I am a little confused about this authentication process. Is there a way so one can authenticate with OAuth programmatically? It says that when authenticating the user will be asked to login before continuing with authentication, how do you achieve this logging in only from code? Or do you need to authenticate first using browser and then use the access token for further requests from the application. What is the typical process of OAuth2 authentication for this scenario?
EDIT: There is only one user that is the account used for our application for accessing their data. That user is registered on their end as the consumer of the API.