# Connecting application
Requirement: Tutorial: Getting started
# Step 1: Obtain user keys
This keyset is used for authentication. It gives access to the account and has the rights of the user that has created the keys. This user must have rights to the documents you want to process. To be able to process documents for a company the user must have rights to the company (being a member). Not every user in an account has rights to every company in the account.
The best way to store the keys is per administration/company. This gives the user the possibility to place companies in separate account or to stop a connection for a specific administration/company. The easiest way to store the keys is per account. 1 fictive user, which has access to all the companies, can create the keys and the same keys will work for every organization in the account. We advise bigger companies to create a fictive user account to the connection for easier management of the connection rights.
# Step 2: Obtain SecurityToken
With the call Login we obtain the SecurityToken with is used as authorization during the next call. This key defines the security context and defines the call’s that are possible. The SecurityToken must be used in the soap header in the next calls. The SecurityToken has a limited time that it can be used. It is advised to request a new token within 4 hours with a new Login or obtain a new SecurityToken for every session.
More information: Use SecurityToken in SOAP header
# Step 3: Obtain PartyId
After a successful login the user needs to be able to select the party (company) available in the account. To get a list of companies use the call GetAccountParties to generate -for example- a drop-down list to select a Party. If there is no company returned with this call the user has no access to a company or there is no company available in this account.
If the context of the party is available via a EConnectPartyId, for example the XCNL100019, then you can use the GetParty to get more information.
# Step 4: Validate connection values
When the call GetAccountParties in Step 3 is working without authentication error the connection is established successfully.