Jump to content

How to bypass authentication prompt when generating Access Token - Sage 200 API UK


 Share

Recommended Posts

I am trying to retrieve data from a windows service application using Sage 200 API. When authenticating there is a popup showing up to sign in. We cannot have this popup in a windows service application since it has no user interaction. Is there a workaround for this?

Link to comment
Share on other sites

  • Administrators

Hi Lyle,

There isn't a method of bypassing the login requirement, but you can maintain the connection indefinitely by using the refresh token. When token exchange occurs you will get a new refresh token, cache it and use when the access token expires or is used. Further details: https://gb-kb.sage.com/portal/app/portlets/results/viewsolution.jsp?solutionid=210226173239343

 

Hope that helps!

 

Ben

Link to comment
Share on other sites

  • 1 year later...
  • 4 months later...

You can utilize the OAuth 2.0 Authorization Code Grant flow. This involves manually obtaining an initial refresh token using a tool like Postman with user interaction, and then programmatically refreshing the token in your Windows service without the need for user interaction. Ensure the necessary permissions are granted to your application, and securely manage the obtained refresh token. This approach allows for seamless authentication in a non-interactive environment like a Windows service application.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...