WHM API createacct function is notifying twice when successfully create an account

Ramon Pego

Well-Known Member
Mar 12, 2019
46
9
8
Brazil
cPanel Access Level
Root Administrator
Hello we are here starting to use the WHM API on our systems to facilitate some services
I noticed that when creating an account through the API the server is notifying me twice with the same email.
Not that this is a problem for us, but it is not a behavior expected by the API

1607025267472.png
1607025438632.png
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,236
404
243
cPanel Access Level
Root Administrator
Hey there!

That's interesting, and I wasn't able to reproduce when I tried that just now. Can you let me know the exact API call you are using so I can test this on my end? Just edit out the domain name or any other sensitive details so I can see the call and I can check this for you. Knowing your cPanel version would also help with this test.
 

Ramon Pego

Well-Known Member
Mar 12, 2019
46
9
8
Brazil
cPanel Access Level
Root Administrator
I tried to use the API Shell now directly on the server but didn't notify doubled either.
Here is the code snippet I use for this request

i'm using

1607081533407.png


Api shell test
1607081761320.png
here works as expected
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,236
404
243
cPanel Access Level
Root Administrator
Thanks for the additional details. I had one of our developers take a look and he couldn't see anything out of the ordinary with the code you provided. If it's working well on the command line and in the API shell, it does seem like something is amiss with the code version, although I'm not able to say what specifically with the details I have.

If you'd like to open a ticket we may be able to check into this further, but our assistance with any type of custom code, even with our tools, with going to be very limited.