Get Authorization code for my app from my API without redirect

We have a FreeAgent account with an App. I want to access this account through our API to retrieve and create invoices within it. However, I don’t want any redirect, as I already have the login details for this account, and this information will be encapsulated within our API logic. The goal is to bring some accounting items into our system via API. Is this possible?