API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

How does the authentication process work?


I am making an app for e-conomic, and I have a question about the flow, I could not find answers to in the documentation (I might have missed something).

Short description of app:
A user can create an account at our website, and insert some money. Then, the user can use these money to send physical letters to every destination in Europe.

We have made an integration to e-conomic, where we with an accessID, can show all invoices from a selected time period. Then the user can select the invoices they want to send, and voila, the letters are sent.

How I understand the flow (the red color means I have no idea how that happens):

  1. We will be an app in this section: http://www.e-conomic.com/apps 
  2. The user says "Get app"
  3. The user are redirected to a subpage, such as www.mydomain.com/economic-authorization
  4. The user creates an account at our website
  5. After user has an account, the user is redirected to the "Request URL", such as "https://secure.e-conomic.com/secure/api1/requestaccess.aspx?appId=myappid"
  6. The app is added in the top, next to "Accounting" and "Reports"
  7. The app somehow, using magic, has an accessID included, which iFrames my subpage such as www.mydomain.com/economic-invoices

My question:
- What is the overall flow, to obtain the accessID from the user? 

- Should the sending of the letters happen inside e-conomic or on our website?

- If we get an app beside "Accounting" and "Reports", how do we set the iFrame URL so it contains the accessID?


Basically... Can someone walk me through this? The documentation doesn't help.

created May 30, 2014 by LetterAmazer
100% Accept Rate
Q 2 A 0 C 0

1 Answer

Best answer
5. You point the user to that URL, with your public key and redirect URL (ie, the URL you want them to come back to).  For example;



6. When the user authenticates your app on the above URL (by logging in and clicking 'Grant Access'), they are redirected to the URL you entered above, along with a token via a GET request.

You then use this token to authenticate as them, to access invoices etc on their account, using the ConnectWithToken function through the API.


Connection tutorial - http://www.e-conomic.com/developer/tutorials

API calls - https://api.e-conomic.com/secure/api1/EconomicWebService.asmx


Access to their account is determined by what access you chose when you setup your app to get your public key.
answered Jul 1, 2014 by olimortimer
selected Aug 1, 2014 by mortenanders
We already have an app using the .NET API, but would like to go with the new rest API.
Most of our users are admins, so we use

economicSession.ConnectAsAdministrator(AdministrationNumber,UserName, Password, AgreementNumber)

How do we go about converting to the new API login system?
I'm a PHP developer, not .NET unfortunately.  You would be better off reading the API documentation, and rewriting your login system.
Visma e-conomic A/S