How to get the user location using REST API | Community
Skip to main content
Vipin_Mp
Level 2
July 11, 2018
Question

How to get the user location using REST API

  • July 11, 2018
  • 2 replies
  • 2776 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
Level 10
July 11, 2018

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

Vipin_Mp
Vipin_MpAuthor
Level 2
July 12, 2018

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
July 12, 2018

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 2
July 12, 2018

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