Forum Discussion

burkheart's avatar
burkheart
Contributor
11 years ago

REST API: Get IP Address for Message for Geo/Location plots

Hi, I am trying to do a Geo location plot for a selected set of messages for a given board.

I was hoping I could get to the IP address of the user that posted the message through the REST API. I would use that IP address to find the Geo coordinates.

Is this possible?

Thanks in advance!

 

 

  • You can get the login name from the author/login property of the message object, e.g.:
    http://[community domain]/[community name]/restapi/vc/messages/id/[message id]

    You can use this to get their last used IP address, e.g.:
    http://[community domain]/[community name]/restapi/vc/users/login/[login name]/settings/name/user.last_visit_ipaddress

    This page has more details:
    http://lithosphere.lithium.com/t5/support-knowledge-base/Obtaining-an-IP-address-using-REST/ta-p/92524
    • burkheart's avatar
      burkheart
      Contributor

      Thank you so much!

       

      Quick follow up: I only see the following settings for a user:

      profile.signature, profile.url_icon, user.last_visit_date, user.registration_date
       
      Do you have to be an admin to see user.last_visit_ipaddress?
       
      Also the TKB link that you posted gives me access denied, because I don't have sufficient privileges. I must be missing something ...
       
      • nathan's avatar
        nathan
        Executive

        Yes - I think only admins can access that kind of information.

         

        Lithium will need to give you access to the knowledge base. JulieH - is this something you sort out?