Re: How to get the user location using REST API

Vipin_Mp
Level 2

How to get the user location using REST API

Is there any way to get the user location using REST API ? I have investigated the same in Marketo doc but couldn't find a solution.

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: How to get the user location using REST API

Do you mean the Inferred Country, etc. fields? Please explain the use case.

Vipin_Mp
Level 2

Re: How to get the user location using REST API

Hi San,

Yes.. country, city etc.  We need to know the visitors location.  We have to display list of items in our website based on the location  (country, city) where the visitors came.

SanfordWhiteman
Level 10 - Community Moderator

Re: How to get the user location using REST API

You cannot use the REST API for this for a multitude of reasons: [1] the API is not designed to be used via the browser (including via proxy) or you have created a gaping Denial of Service hole; [2] the data isn't available when the Munchkin session is created.

Use a service designed for this, like MaxMind.

Yanir_Calisar2
Level 3

Re: How to get the user location using REST API

Or maybe use free API's like https://ipapi.co/json