Suspend account returning account does not exist
AnsweredHello all,
I am facing a problem with suspending cpanel account using whmapi on my server. when I make a request using below url to my server
https://myserver:2087/json-api/suspendacct?api.version=1&user=accountName
I get response back from the server like below
{"result":[{"status":0,"statusmsg":"_suspendacct called for a user that does not exist. ()"}]}
off course the account correct and exist on my server, Am I doing something wrong here? appreciate any help on this.
cpanel version on my server is 122.0.13 and it is running on Alma Linux v9.4.0
Many thanks
-
Hey there! I just tested that API call on a version 122 system and that is working well for me.
Do you see a directory inside /var/cpanel/userdata for the user in question? Also, I'm assuming everything else about the account (cPanel account, mail, etc.) is working normally?
0 -
Hi,
Got it working finally after I did some debugging, basically the problem was URL encoding method I was using from C#.
Many thanks
0 -
I'm glad you were able to find the issue!
0
Please sign in to leave a comment.
Comments
3 comments