Picture of pietro
Registered 2 years 140 days
pietro Thursday, 29 February 2024, 08:20 PM
Grant access to APIs by default
Hi,

After installing my application, I need to enable the APIs and WebSocket for it to function correctly. How can I do this without accessing the PBX screen > Objects > [My app name] and then going to the App tab and Enabling all APIs Is there any way to check it by default?
grantAccess.png

Picture of mitop
Registered 3 years 348 days
mitop Monday, 4 March 2024, 10:31 AM
Re: Grant access to APIs by default
Hello Pietro,

to grant access to APIs and Websocket connections go to your App project and have a look to the file "yourcompany-yourappMANAGER.js".
From line 50 you should see the variable/list "typeCheckmarks". In the first line you define the rights for the Users app and in the second line the rights for the Admin app by simply setting the corresponding value from False to True. The Admin App uses the websocket connection of the Users App, no True on WebSocket should be necessary here.
The rights are set when the app object is created via the PbxManager.

Best regards
Mladen
← You can define your color theme preference here