Skip to main content

I’ve maganged to setup the connection to the Exact Online API from postman.

Now I try to setup the connection from the SF but we running into an invalid_request error as a result.

I’ve used the same input variables and keys, so at the moment I’ve not a clue why this result is happening:

 

 

 

 

 

 

Has anybody in the community succesfully connected to the Exact Online API.

 

Hi Edwin,

Can you check the access token from Postman and the one you got back from the OAuth Refresh Connector with this website?
https://jwt.io/

I am curious if both are valid (and if there are differences). Of course the client_id and the expire time are different but the rest should be mostly the same.


I noticed the tokens Exact Online returns wont be valid in jwt.io, so that part of my reply can be ignored.

How do you use the access_token in the HTTP Connector?
I could get it to work by setting the HTTP method to GET and adding the following headers:

[ { "Key": "Accept", "Value": "application/json" }, { "Key": "Authorization", "Value": "Bearer {var_access_token}" } ]

I have a variable in my process flow called “var_access_token”.


Hi Dick, this is what I have in my headers.. 

>{"Key":"Authorization","Value":"Bearer {access_token}"}]

 

In the content_type: application/xml

In the content the variable where the reponse it stored

In the HTTP method; GET

And in the URL the: endpoint address


 

 


For exact: With a post you send JSON

With a get an XML is returned.


Exact Online can also return JSON from a GET request, with the right header as documented here.

https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Simulation-header-types

 

For the current issue, you said you could get the new codes and that after that it didn't work correctly anymore, specifically the access_token. Is the datatype for the access token long enough? (also in the process procedures?).

Also note, Exact Online doesn't allow refreshing the access token before 9 minutes and 30 seconds are passed, according to their documentation. So always calling the OAuth Refresh Token Connector might not work.

I am also working on a small guide, to make it more clear how to use the OAuth connectors, but it might take a while for me to finish.
 

 


Dick, It’s all working at the moment. I store the expiration datetime and when expired I do a refresh token call. That works fine. That’s only one extra step in all my process flows. And indeed somehow my process flow variable was set to 250 characters and the token is 700 so that’s fixed as well.

When it all works, it’s very simple, but to find out how how to get all the headers, tokens, json, input and output parameters in the right place in the right format is quite a challenge. 

I’m now setting up step by step all the endpoints. Accounts, BankAccounts, SalesEntries etc.


A new blog post is just released, maybe it provides some helpful extra information.

It is good to hear that everything is already working for you!

Regards,

Dick


Reply