Solved

Http connector Exact online

  • 19 November 2021
  • 32 replies
  • 1217 views


Show first post

32 replies

Userlevel 6
Badge +16

Can you try adding the header:  [{"Key": "Accept", "Value": "application/x-www-form-urlencoded"}]

Also what authentication are you using in the SF HTTP connector? 
 

Userlevel 3
Badge +11

Dit is wat ik terugkrijg in de headers. We sturen dus geen headers mee, maar bij de output vul ik wel de procesvariabele met de headers die we terugkrijgen

 

  headers [{"Key":"Content-Length","Value":"27"},{"Key":"Cache-Control","Value":"no-cache,no-store"},{"Key":"Content-Type","Value":"application/json"},{"Key":"Expires","Value":"-1"},{"Key":"Pragma","Value":"no-cache"},{"Key":"Referrer-Policy","Value":"strict-origin-when-cross-origin"},{"Key":"X-Content-Type-Options","Value":"nosniff"},{"Key":"X-Xss-Protection","Value":"1; mode=block"},{"Key":"Date","Value":"Fri, 19 Nov 2021 14:20:46 GMT"},{"Key":"Connection","Value":"close"},{"Key":"Set-Cookie","Value":"ExactOnlineClient=YbflRElZbBBKXYLhlCvSlj7hctMcpCHq7mcO8wACYt15agMdANvT07jRM73OcVh886KPECsAEu+ioKUHseMF1xj56Bb4noWvU7VjaxbjtLL1eMO+frXa9dX0wbLHaHRcJoUJAliTVCqq0Ts4dMibQId+vXWlkWXxQGAAE9/gjJ4=; SameSite=lax; expires=Mon, 31-Dec-2198 23:00:00 GMT; path=/; secure; HttpOnly"},{"Key":"Strict-Transport-Security","Value":"max-age=31536000 ; includeSubDomains ; preload,max-age=31536000 ; includeSubDomains ; preload"}]
Userlevel 3
Badge +11

Hi Erwin,

here’s the screen with the headers. I’ve displayed the hidden headers as well

 

 

Userlevel 6
Badge +16

Can you also post a screenshot of the headers you are using in Postman. Postman and SF do not necessarily use the same headers. 

Userlevel 3
Badge +11

So in postman we only send:

grand_type=refresh_token

refresh_token:abcdeetc…. (The one we get from the API)

client_id=

cleint_secret=

No params, Authorization is set to Bearer to, no specific headers and the params above are setup in the body.  Postman sends them as application/x-www-frin-urlencode 

So we copied that to the SF. Kevin helped me this morning to get this working. But we’re gettting stuck when setting up the same connection in the SF

Userlevel 3
Badge +11

Hi Erwin, we using SF 2021.2.

 

And we’re trying to talk to the exact-online API… (That’s something different then Exact globe?)

 

This is the setup in postman to get the refresh key which is working in postman.

This is the first step I try to get working in the SF.

 

 

 

 

Below is the result in Postman when we open the <> code section to see what we send.

We’ve tried to add the cookie as wel but with the same result.

 

 

curl --location --request POST 'https://start.exactonline.nl/api/oauth2/token' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--header 'Cookie: ASP.NET_SessionId=0d23215kwpt3zlddlc4y4gz2; AWSALB=1pnr4OGoFBfALC+ixp0QrxPOKyfXiDhu2s915jf5e6RLIk0DdH/riVG2h9YlA4E29JIJ4BAj+PbkrCBoe1LB2XWbsvRl8wM4SbA3z4qUX845N9Kr6xb7nLFJlH/+; AWSALBCORS=1pnr4OGoFBfALC+ixp0QrxPOKyfXiDhu2s915jf5e6RLIk0DdH/riVG2h9YlA4E29JIJ4BAj+PbkrCBoe1LB2XWbsvRl8wM4SbA3z4qUX845N9Kr6xb7nLFJlH/+; ExactOnlineClient=kVdQFzO29SAu20b+Hj9pHeryWQqExS1/uNm6W0chlYN1vWb3e1s5cxKHq8HPKyyTMbRTRkgQJj0kzGstxZsM1u+AZtd36ev7ol+gVDmGns1n7qOJoKQF/MKfcwUULYm4chHkzfo2HsmR7FVaI0+q1gO7ks0+nSgP+FsGuqdDceU=; ExactServer{79a383a7-1e93-42ec-841e-61b7ae40e41e}=Division=3084597' \

--data-urlencode 'grant_type=refresh_token' \

--data-urlencode 'refresh_token=Y2MN!IAAAAA5UpJQK5Eh-bKOyeoJwlYAnV-pUHsyI-psvA0WDI8r04QEAAAF3OJA1gQ_a6WXxg-IZdsxmpU2X_7x_osBjJ9AsmxS8ZaH4rIza3JOgWHo4Xv8Mve8aVGNsnQ7My4ApS-HO67H_d0843Pux1Tp-Ugfx47pd7bv_Ijqa_jeef3_IU3M1K_EnbOQbxozlGLegl2_ZpUlFQH8hsiFfyzIm5mS8x0n9Sx3J8FouDfBCTg0T-dkdWfrOICSUXkOsN0I_eY83dqkvpijS0Eh7WHUrJbkxl1VTPR4IzPPybhPKHF9KCTkYfWixq4OczhGEYnMaFht5uYC65Q-VCC6crLBZfyumFoLEK2tZZz7F_s8IdfFdZHsBq8WJFcm0l8puxfEROWGTUwM_Bd4S76QruEM2J9DqLop6fmCIoIAQmsdnt0rQlqiJP7uOQi3BxtMo9XYG1L_qQ9brtz_lkGu-_hAV1y9JrEUmggRO57E2MxFuHxS-aOyE6LrPy9Gd4NXHcUmVVjBjCPMiZd2EvT77uGxKKQ12BqgvBKEYgqVJKjCOSMRNNt5zAWay6BRbDlfF3yP0jrxt262-78j1wE9d-kUSa6ltnh0WHuaT1voWs8XLa-K6jTFijBZfbQRdRFWSe7-1kWqY3VeaupXiXE3u54dCAhcTDyUxupvPSBc6nwBuTtxt7COjTIE' \

--data-urlencode 'client_id=645d2b8……………..cf6bc8c2d' \

--data-urlencode 'client_secret=eL……...TBJ'

 

I hope you can help me out...

Userlevel 6
Badge +16

I have made a successful connection to Exact Globe (not using the http connector currently available but an older connection method). But I have also made a successful connection to a different system using the HTTP connector the SF currently supplies. 

What version of the SF are you using? 

And can you post the postman connection that is working for you (filtering out any sensitive data). 

Reply