15.10 External Applications


This functionality of vtenext, located in Settings > External Applications, allows external services to connect to the CRM using the OAuth2 authorization protocol.

image.png

Configuration page for External applications

How does it work? External services, here called External Applications, connect to vtenext via REST API, passing a access_token to authenticate. This token is provided by vte via the OAuth2 protocol, using one of the 2 avaialble flows. Let's see an example:

image.png

This flow is called Client Credentials and there are 3 parties:

  1. Application (for example an ERP)
  2. Authorization Server (in case of vtenext, it's the same as the point 3)
  3. Resource Server, the server containing the data to be retrieved (vtenext in this case)

Briefly, the Application (eg: ERP reading Invoices), asks the Authorization Server the Access Token, sending the pair (Client ID, Secret Key) to authenticate itself. If the credentials are correct, an Access Token is given to the Application, that can be used to retrieve information from vtenext via REST API.

An example of REST API call with access token is:

curl -X POST '<VTE_URL>/restapi/v1/vtews/query' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -d '{"query":"SELECT * FROM Invoice;"}'

The advantage of access tokens is that they have a limited time validity (usually 1 hour) and it's revokable server side, so it's possible to allow access to external apps in a controlled way, without providing them the main password. After the token expiration it's necessary to obtain a new one, repeating the procedure.

This flow is recommended for communication between 2 servers, without human intervention after the initial configuration

The second flow is called Authorization Code and it involves an additional party, called the User.

image.png

In this example, the Application that wants to connect to vtenext is, for example, Facebook, that needs to reads the user's Leads. The difference is that it's not Facebook directly that requires this data, but the user delegates Facebook to access his own data present in vtenext. The objective is then to provide Facebook with this data, without giving it the user's full credentials (password) to the system. So Facebook will ask the user to obtain an authorization code, exchanged then by Facebook with an access token, used then to retrieve the data. The access token can be used once only, or renewed automatically (if the user granted this type of access).

So, even though Facebook got access to Leads in vte, it never read the user password and after the expiration of the access token, it won't have access anymore.

This flow is recommended when the application needs to ask user's permission to access the data.


General configuration

image.png

At the beginning of the page, there are some general settings::

Service Account Configuration

image.png

Click on the button ADD on the right

image.png

  1. Click on the ADD button on the right.

  2. A wizard screen appears to guide the configuration process.

  3. Select the Client Type, choosing between:

    • Web or Mobile Application (if access requires user login)

    • Service Account (if access occurs in the background between two servers)

To configure a Client Credentials flow, select:

Additional configuration fields will then appear:

Configuration details:

By providing the Endpoints, Client ID, and Secret Key to the external system’s technician, the connection can be finalized.

For JWT signed authentication, the Secret Key is not a simple string, but a cryptographic key in PEM or JWK format, generated only after saving the configuration.

image.png

Web or Mobile Application Configuration

image.png

Click on the button ADD, on the right

image.png

You are presented with the same wizard, but this time choose Web or mobile application. So we get the following:

image.png

Application Type Options:

For a Web Application, the configuration follows a similar process to the Service Account setup:

Offline Access:

By enabling Offline Access, together with the access token, a refresh token is returned, that can be used to automatically obtain a new access token after its expiration.

Redirect URL Configuration:

Authorization Screen Customization:


From the settings page, Settings > External Applications, it's possible to see the list of registered applications and deactivate them or revoke all the active tokens:

image.png

In this list it's possible to see Expired tokens. In case of expired tokens the user will have to re-authenticate to obtain new ones. On the right some tools are present:


Linked Applications in User Preferences

image.png

In User Preferences, under Linked Applications, users can view all applications associated with their account.


Revision #3
Created 2026-01-28 14:56:26 UTC by Admin
Updated 2026-05-21 14:25:54 UTC by Alberto