Sage 50 SDK (API 2023)

Hello all,

I'm attempting to get a basic C# application off the ground in order to import sales invoice data.  I have received an Application Id for the app, and have called my session begin and am successfully viewing the company data. 

However, when I attempt to request access to the company (which I believe is needed before I can begin calling any of the Factory classes), with the following:

AuthorizationResult authorizationResult = new AuthorizationResult();
authorizationResult = session.RequestAccess(thisCompany);

company = session.Open(thisCompany);

I receive an "Authorization Exception: Authentication failed" message.

My authorizationResult object shows a status of "Pending", which is likely the culprit.

So, I have 2 questions:

1.  Would the Pending authorization create the Authentication failed exception?

2.  How would I go about moving the authorization from Pending to Accepted?

Thanks in advance for any direction that you can provide.

~ Jonathan

Parents
  • 0

    Go to SAGE application and close the company you are trying to connect and open again. At the time of opening, SAGE will ask to allow (or don't allow) to all the requests received from outside the application. That time you can allow your C# application to connect with SAGE Company. On very first time, you can receive multiple alerts, how many times you tried to connect to the company. It's working for me.

Reply
  • 0

    Go to SAGE application and close the company you are trying to connect and open again. At the time of opening, SAGE will ask to allow (or don't allow) to all the requests received from outside the application. That time you can allow your C# application to connect with SAGE Company. On very first time, you can receive multiple alerts, how many times you tried to connect to the company. It's working for me.

Children
No Data