ConnectAsAdministrator

Forum for .NET developers using the E-conomic API.
Exchange your ideas, tip and tricks using the API.
Best Practices

ConnectAsAdministrator

Postby kiaer@innologic.dk » Thu Jan 19, 2012 4:10 pm

I wish to use the ConnectAsAdministrator-method for establishing connection to the API.

I am a little confused with the parameters:

adminAgreementNo and clientAgreementNo. What is the difference between these? The only agreement no. I have is the one I normally use when signing in to our account throught the webpage.

Please specify :)

Kind Regards
Frederik
-
kiaer@innologic.dk
 
Posts: 19
Joined: Fri May 13, 2011 3:15 pm

Re: ConnectAsAdministrator

Postby Christian Estrup » Thu Jan 19, 2012 4:23 pm

Hi,

If your credentials are for a company user, you must use the API connection method Connect().

If they are for an administrator user, you must use ConnectAsAdministrator() - and consequently supply both the administrator agreement number and the agreement number of the company whose data you wish to access.


Best regards,
Christian Estrup
Chief Architect

Image
Online accounting
User avatar
Christian Estrup
 
Posts: 245
Joined: Tue Jun 09, 2009 6:37 pm

Re: ConnectAsAdministrator

Postby kiaer@innologic.dk » Thu Jan 19, 2012 4:24 pm

I solved this - it's 3rd part accounting which is called Administrator.

When a user is accessing through the API how do I know if it is the agreement/company super user? Or just a regular employee?

/ Frederik
-
kiaer@innologic.dk
 
Posts: 19
Joined: Fri May 13, 2011 3:15 pm

Re: ConnectAsAdministrator

Postby Christian Estrup » Thu Jan 19, 2012 5:10 pm

Hi,

You cannot know this purely from the API.

If you need to support both company and administrator logins, AND your integration workflow asks your users for the corresponding credentials - then you need to ask them for either 3 or 4 values anyway, in which case it'll make sense to have them make an initial, separate choice of whether to use a company or administrator login.

If you HAVE a set of credentials - agreement number (unknown type), user ID and password - and wish to check whether it's a company or administrator user, you can always figure it out by logging into the e-conomic application - since the subsequent user interface will reflect the user type :-)


Best regards,
Christian Estrup
Chief Architect

Image
Online accounting
User avatar
Christian Estrup
 
Posts: 245
Joined: Tue Jun 09, 2009 6:37 pm

Re: ConnectAsAdministrator

Postby kiaer@innologic.dk » Thu Jan 19, 2012 9:11 pm

Christian,

I wish only to let super users interact with our system. Is this possible? I use the regular company login but found that not only our super user (is it possible to have more then one?) but also our regular company users can get access to our company data through the API.

Is there a way in which I can let only the super users interact through the API and exclude regular company users?

/ Frederik
-
kiaer@innologic.dk
 
Posts: 19
Joined: Fri May 13, 2011 3:15 pm

Re: ConnectAsAdministrator

Postby Christian Estrup » Fri Jan 20, 2012 1:59 am

Hi Frederik,

Yup, we've recently added just that possibility:

In e-conomic, edit the master information of your non-superusers and remove the tick in "Access via API".


Regards,
Christian Estrup
Chief Architect

Image
Online accounting
User avatar
Christian Estrup
 
Posts: 245
Joined: Tue Jun 09, 2009 6:37 pm


Return to .NET



cron