Create export app in Microsoft flow

Hi,

I’m very new to this, SQL developer by trade.

I want to use Microsoft flow to call this API and get the trial balance transactions.

I created a developer account and created an APP. First question I have is, what URL should I use in the URL?

Is it: https://api.freeagent.com/v2/accounting/trial_balance/summary ? as I want to get the trial balance totals?

It has given me an id and secret

What do I need in the redirect urls? is the google one fine for production?

I’m trying this from the “quick start notes”

https://developers.google.com/oauthplayground/#step3&url=https%3A//&content_type=application/json&http_method=GET&useDefaultOauthCred=unchecked&oauthEndpointSelect=Custom&oauthAuthEndpointValue=https%3A//api.sandbox.freeagent.com/v2/approve_app&oauthTokenEndpointValue=https%3A//api.sandbox.freeagent.com/v2/token_endpoint&includeCredentials=unchecked

I have removed the sandbox from the end point and toekn end point boxes under the cod, enterede my id and secret

my method is GET and request url is: the trial balance one above (new user to limited to to links!!)

the error i get is:

{
“errors”: {
“error”: {
“message”: “Malformed Authorization HTTP header. Should be of form “Authorization: Bearer TOKEN””
}
}
}

I have selected authorization header w/ Bearer prefix

What am I doing wrong?

Hi Rob!

Welcome to the FreeAgent API forum! :wave: I’m Adam and I’m one of the Support Engineers here at FreeAgent.

Firstly, yes, you’re right in thinking that’s the URL to query if you want to get the trial balance totals.

Just to give a bit of background, the error that you’re getting back is as a result of the format of the Authorization header not matching “Bearer TOKEN”. If the Authorization header was missing, or the token was incorrect, you would get back a different error.

Can I clarify, are you seeing this error when querying the FreeAgent API via the Google OAuth 2.0 Playground or via Microsoft Flow? Just to help troubleshoot, are you able to query the trial balance URL successfully via curl? (Here is a page in our docs giving some guidance if you haven’t already given this a go - FreeAgent Developer Dashboard)

Best wishes,
Adam