I have an existing Perl script that uses the /Personalization/set API to set the default webmail app to roundcube. It works on my current production server.
I am in the process of setting up a new server (which has the same version of cPanel), but the same code doesn't work. The only major difference is the new one is AlmaLinux vs the production server which is CentOS 7.
I can use the following SSH command to test the operation and it succeeds on the new server:
echo '{"personalization":{"[email protected]_default_webmail_app":"roundcube"}}' | uapi --user=root --input=json --output=json Personalization set
I thought it was supposed to create a default_webmail_app file in the /home/[accountuser]/.cpanel/nvdata folder. But that folder or file does not exist after the command is executed.
When I try my script using the Personalization API on the new server, the returned response content is an HTML page that says my security token is invalid. I have checked the user ID and password being sent in during authorization and it's correct and works elsewhere.
I thinking this must be some difference in the server/cPanel configuration or perhaps a configuration difference with the user account on the new server, since the same code works fine on the existing production server. Also, perhaps using "root" as the user in the SSH command allows it to succeed whereas the script is not authenticating as root (although it doesn't authenticate as root on the production server either). In the script, it authenticates using the account-level user ID and password, which works on the existing production server.
Any ideas why the nvdata/default_webmail_app folder/file isn't being created when the command executes successfully in a SSH console? Or why the API call would fail from my script on the new server?
Thanks for any advice or suggestions you may have.
I am in the process of setting up a new server (which has the same version of cPanel), but the same code doesn't work. The only major difference is the new one is AlmaLinux vs the production server which is CentOS 7.
I can use the following SSH command to test the operation and it succeeds on the new server:
echo '{"personalization":{"[email protected]_default_webmail_app":"roundcube"}}' | uapi --user=root --input=json --output=json Personalization set
I thought it was supposed to create a default_webmail_app file in the /home/[accountuser]/.cpanel/nvdata folder. But that folder or file does not exist after the command is executed.
When I try my script using the Personalization API on the new server, the returned response content is an HTML page that says my security token is invalid. I have checked the user ID and password being sent in during authorization and it's correct and works elsewhere.
I thinking this must be some difference in the server/cPanel configuration or perhaps a configuration difference with the user account on the new server, since the same code works fine on the existing production server. Also, perhaps using "root" as the user in the SSH command allows it to succeed whereas the script is not authenticating as root (although it doesn't authenticate as root on the production server either). In the script, it authenticates using the account-level user ID and password, which works on the existing production server.
Any ideas why the nvdata/default_webmail_app folder/file isn't being created when the command executes successfully in a SSH console? Or why the API call would fail from my script on the new server?
Thanks for any advice or suggestions you may have.