Having issue with verifying freeagent developer API

As the title says,

I have a scenario in Integromat that makes a “My HTTP OAuth 2.0 connection” request to FreeAgent. It has been working for over a year. However, a few weeks ago, an error occurred in Integromat
“(Cannot initialize the scenario because of the reason ‘Scenario validation failed - 1 problem(s) found.’

  • Failed to verify connection ‘FreeAgent Developer API’. “invalid_grant”); as seen in the image. The scenario attempted to initialize before timing out and ultimately failing. "

Since then, I have deleted the connection with FreeAgent creating a new one using the OAuth 2.0 connection and entering in the credentials (Client ID, URI, client secret). However, this time the error that returns is that the access token is not recognised.

I have the following URIs set up:

https://www.getpostman.com/oauth2/callback
https://labs.pathfix.com/integrate/command
https://www.integromat.com/oauth/cb/oauth2

I’ve tried both a client and non-client account.
Has something changed due to the rebranding as “Make”, which I haven’t migrated to?

Opera Snapshot_2022-11-15_161605_www.integromat.com

Any help would be greatly appreciated

Thank you

Hi Robel_Araia,

My name is Steven, I’m one of the Support Engineers here at FreeAgent. Welcome to the FreeAgent API forum and thanks for getting in touch with your query, I’ll do my best to help you out.

The errors you’ve received I believe are a result of making requests to the API without a valid access token. I would recommend reading our documentation on the OAuth process here. This details how a FreeAgent user must authorise an application to access their account via the API. In the process, after approving the app, an authorisation token is returned when the user is sent to the Redirect URI for the given app. After obtaining the authorisation token, the app must then exchange this for an access token to use to access a FreeAgent user’s data. It appears that this process has not been completed or has failed at some point in your setup.

When you created a new connection with FreeAgent, did you create a new FreeAgent app with your FreeAgent developer account? If so, did you then approve the new app for each of the FreeAgent users for which you are trying to retrieve data? If the Client ID (OAuth ID) and client secret (OAuth secret) changed, each user will need to approve the new app integration.

Make (Integromat) have a guide about integrating with FreeAgent, either by approving their own app or creating your own FreeAgent developer app, take a look here.

I noticed on the above guide from Make, that they specify the redirect URIs to be:
https://www.integromat.com/oauth/cb/freeagent and https://www.make.com/oauth/cb/freeagent. These differ from the redirect URI you have used https://www.integromat.com/oauth/cb/oauth2, perhaps this could be causing issues in returning users to Make after approving your app?

I would suggest updating the redirect URIs for your app, ensuring the client ID and secret are correct in Make, and then ask your FreeAgent users to follow the authorisation/approval process for your app as described in the guides provided, which should result in you obtaining an access token for each user to make successful requests to our API.

Hopefully this helps, please let me know if you have further questions.

Kind regards,

Steven Wright
Support Engineer
FreeAgent