3CX WEB API Windows installation guide (v20)

Created by Anton Zykov, Modified on Sat, 1 Aug at 4:31 PM by Oleg Agapov

Make sure that the 3CX v20 server is installed and activated

1. Upload files

Create C:\Program Files\3CX Phone System\Bin\webapi - for log files


Download WebAPI https://download.creomate.com/webapi_win_en_20.zip


Place files in a folder C:\Program Files\3CX Phone System\Bin\

  • TCXWebAPI.exe
  • TCXWebAPI.ini
  • ffmpeg.exe
  • AuthKeys.csv
  • AllowedIP.txt
  • asr.config
  • trans.exe
  • Params.csv
  • Events.csv
  • Users.csv


Create C:\Program Files\3CX Phone System\Bin\webapi\mp3 (for MP3 records) 


Don't forget to grant write permissions C:\Program Files\3CX Phone System\Bin\webapi\ and C:\Program Files\3CX Phone System\Bin\webapi\mp3


2. Create Windows Service WebAPI


Execute in command shell (not PowerShell) as Administrator:


sc create webapi binpath= "\"C:\Program Files\3CX Phone System\Bin\TCXWebAPI.exe\" --urls=http://127.0.0.1:8081" displayname= "3CX WebAPI" start= auto



Start WebAPI Service


sc start webapi


Stop WebAPI Service


sc stop webapi



3. Configuring NGINX

Upload the webapi.conf file to the C:\Program Files\3CX Phone System\Bin\nginx\conf\snippets\ folder


webapi.conf

location ~ ^/webapi/?(.*) 
{
#   allow 89.216.58.242;    # uncomment to allow access only from specific IP addresses
#   deny all;        # uncomment to allow access only from specific IP addresses
  include "shared-headers.conf";
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_pass http://127.0.0.1:8081/webapi/$1$is_args$args;
  proxy_buffering off;
  proxy_read_timeout 300;
  proxy_connect_timeout 300;
  proxy_send_timeout 300;
}


Restart nginx Service (3CX Phone System Nginx Webserver)

sc stop nginx
sc start nginx


4. Checking


http://127.0.0.1:8081/webapi/tcx


From public network:

https://{fqdn and port 3СХ Phone}/webapi/tcx



5. Activate a license


https://{FQDN and port 3СХ}:5001/webapi/admin/


login - TCXWebAPI
password- Activate (after activation will be license XXXX-XXXX)


For trial activation use NHQE-QRND-TRIAL (only once)


6. Enjoy :-)


To remove the Web API, follow these steps

1. Delete WebAPI Service


sc delete webapi


2. Delete folder C:\Program Files\3CX Phone System\Bin\webapi


3. Delete files

  • TCXWebAPI.exe
  • TCXWebAPI.ini
  • ffmpeg.exe
  • AuthKeys.csv
  • AllowedIP.txt
  • asr.config
  • trans.exe
  • Params.csv
  • Events.csv
  • Users.csv




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article