--- title: "Part 2: Setting up the App" slug: "part-2-setting-up-the-app" updated: 2022-06-20T09:09:04Z published: 2022-06-20T09:09:04Z canonical: "developer.comm100.com/part-2-setting-up-the-app" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Part 2: Setting up the App ## Introduction Third-party developers can extend the functionality of Comm100 through the Comm100 app. Vincall as a third-party system, can also extend the Comm100 through the app. Adding the VoIP functionality of Vincall into Comm100. In this Tutorial we will cover how to add an app to Comm100 and then extend the functionality by frontend pages. Also we will create a backend service to provide API for the Settings page and add authentication for the Vincall app. After completing this tutorial, we will see an app called Vincall Integration in the private app, and clicking on Settings' Button will take you to the app's settings page. ![image.png](https://cdn.document360.io/c74d881b-a484-4687-85e4-c23c20d25ce2/Images/Documentation/image%2843%29.png) ## Step-by-Step Instructions 1. [Creating an App in Comm100](/docs/part-2-setting-up-the-app#creating-an-app-in-comm100) 2. [Adding Settings Page](/docs/part-2-setting-up-the-app#adding-settings-page) 3. [Creating Comm100 OAuth Client](/docs/part-2-setting-up-the-app#creating-comm100-oauth-client) 4. [Authenticating with Comm100 Agent via OAuth 2](/docs/part-2-setting-up-the-app#auhenticating-with-comm100-agent-via-oauth-2) ### Creating an App in Comm100 All of the Vincall features added into Comm100 are based on Comm100 app. So let's create an app in the Comm100 account. 1. Open a browser and log in to your Comm100 account using your Comm100 credentials (email and password). Go to **Apps & Integrations** page and click **Create or manage your own apps** link to create own own app. ![image.png](https://cdn.document360.io/c74d881b-a484-4687-85e4-c23c20d25ce2/Images/Documentation/image%28122%29.png) 2. Click the **Add App** button and fill in the following information: ![image.png](https://cdn.document360.io/c74d881b-a484-4687-85e4-c23c20d25ce2/Images/Documentation/image%2845%29.png) - **Name**: `Vincall` - **Description**: `You can use Vincall to enable the phone channel. We allow Agent to use Vincall directly in the Agent Console to answer calls or call users directly.` - **Logo**: ![image.png](https://cdn.document360.io/c74d881b-a484-4687-85e4-c23c20d25ce2/Images/Documentation/image%2846%29.png) - **Settings Page URL**: `./integraiton.html` - **Enable**: `true` For more instructions on these configurations, please refer to [App Properties](https://developer.comm100.com/docs/app#site-app). 1. Click the save button will return to the list page. You can see such an app in this page. ![image.png](https://cdn.document360.io/c74d881b-a484-4687-85e4-c23c20d25ce2/Images/Documentation/image%2847%29.png) ### Adding Settings Page In the previous step, we specified the settings page as `./integration.html`. We need to create the page in our frontend project **vincall-app**. 1. Create a template html **index.html** file (**src/pages/integration/index.html**) for integration page. ``` VinCall Integration
``` 1. Create a **main.tsx** file (**src/pages/integraiton/main.tsx**) to render the component into the div container with the id main. ``` const App = () => { return ( ); }; render(, document.getElementById("main")); ``` 1. Add `Authentication` component in **Login.tsx** file (**src/pages/integraiton/Login.tsx**). ``` export const Authentication = () => { const [accessToken, setAccessToken] = useState(""); const currentHref = window.location.href.substring( 0, window.location.href.indexOf("?") ); const getAccessTokenHref = currentHref.replace( /\/([^\/]*)\.html/gi, "/getAccessToken.html" ); const handleMessage = async (event: any) => { const { code } = event.data; const pathname = event.source.location.pathname; if (pathname.toLowerCase().indexOf("getaccesstoken.html") >= 0 && code) { setSessionStorageAccessToken(code); setAccessToken(code); } }; useEffect(() => { window.addEventListener("message", handleMessage); return () => window.removeEventListener("message", handleMessage); }); return ( <>