This is an application example for 3CX XAPI API demonstration.
From the Admin Console in the 3CX Webclient, go to Integrations > API:
- Press the Add button to create a new client application.
- Specify the ClientID (DN for accessing the route point, which is also needed for authorization).
- Check the XAPI Access Enabled checkbox.
- Select group and desired role.
- After successfully creating a new API instance, you will receive an API key for your third-party applications. This key will be shown only once, so be sure to save it for future use.
- That's it! You've successfully completed the PBX configuration.
Important
You must have a 3CX Enterprise license to use 3CX XAPI.
In the config.ts file put your base PBX URL, client_id from step 2. and client_secret from step 4.
Note the following: Run tests inband because only one access token can be created at a time. The tests CAN ALTER your PBX! Please make a backup or use a separate instance.
You can explore Jest test suites in src folder and see how to perform actions Launch "yarn jest -i" to launch them all
Launch "yarn jest -i src/fax.spec.ts" to launch individual test