I am integrating Square into my Android app.
I am struggling with where to find the locationId
to pass to the enforceBusinessLocation()
method. I've set up a location in my Square dashboard but it isn't obvious where to get the locationId
from.
I've tried using the location nickname (I tried both mixed case and uppercase - so, in my case, "mwe" and "MWE"), but that didn't work. It results in:
ILLEGAL_LOCATION_ID: The LOCATION_ID parameter does not match the ID of the business location currently logged in to Square Register.
I have selected that same location when logging into the Square Register app on the device.
I understand the locationId
is optional, but I would like to include it.
So where to find the locationId
as required for enforceBusinessLocation()
?
There is a much easier way to get it. Just log in and click on Accounts & Settings, click on Locations (here's a shortcut), click the location and then you can see URL of the page change. The location ID is the last part of the URL.