Getting Account information from Ip Address

mxsmith

Registered
Sep 26, 2013
4
0
1
cPanel Access Level
Root Administrator
I have ran into a scenario where I have a dedicated ip, but not sure how to find the user associated with it programmatically. I know I can find it in the WHM UI, but can I get the same information from the WHM API? I tried the WHM API call 'listips', however that did not return user information (even if the ip was a dedicated ip).
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello,

You can use the listaccts WHM API 1 function to find accounts associated with a specific IP address. Here's an example of a command you can use:

Code:
whmapi1 listaccts search=10.1.1.1 searchtype=ip
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
I'm happy to see your question is now answered. Thank you for updating us with the outcome.