The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting Account information from Ip Address

Discussion in 'cPanel Developers' started by mxsmith, Jun 30, 2016.

Tags:
  1. mxsmith

    mxsmith Registered

    Joined:
    Sep 26, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    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).
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,708
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. mxsmith

    mxsmith Registered

    Joined:
    Sep 26, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Awesome, that is exactly what I was looking for. Thanks!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,708
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page