MaxMind / IP Data in Webhooks

Hi all,

I’m seeing the IP and Geo data for users when they sign up, but I can’t see how to get that information into webhook events.

Is there a setting or a plugin I’m missing to get that info into the User webhooks?

What are you trying to do with or because of their ip?

Add the location information to their contact in Hubspot.

Ah. I see. That makes sense. Yeah, if the webhook isn’t including the location (and it’s not surprising that it’s not), you’ll need a plugin to add that to the webhook.

Maybe the plugin would copy the location to a user custom field which might be part of the webhook load? Or it might need to get added to the serializer.

This plugin might be a good example on how to do that:

I’m a little surprised the signup webhook doesn’t include the IP information

If I had to solve this I would:

  • at the webhook receiver
    • query back to Discourse to retrieve the signup IP
    • then look up the signup IP in the Maxmind DB (or equivalent)
    • push that information out to where it needs to go