Subscribe to this thread
Home - General / All posts - Web Server: geojsonserver returns (403) Forbidden
joebocop
340 post(s)
#03-May-18 17:08

I have a URL which returns geojson text.

When I paste that URL into Chrome/Edge/whatever, the raw text is correctly returned to the browser. I can File -> Save that text as a .geojson file on disk, and then successfully import or link to that file from Release 9.0.166.5.

If instead (of importing these data from a file saved on disk) I create a new data source of type "Web Server: geojsonserver", specifying that same URL, the resulting data source does not contain any data, and the log pane reports "The remote server returned an error: (403) Forbidden".

The "Changes" document for Release 9.0.164.4 (where geojsonwebserver was introduced) says

There is a dataport for GEOJSON web servers. The requirements for GEOJSON data returned by the server are the same as for GEOJSON files.

That suggests to me that the server from which I am requesting the geojson is not returning data in the form expected by the Release 9 geojsonwebserver dataport.

My geojson URL string contains an API key, so I'm not able to share it here, but might that be the cause of the Forbidden error?

Thanks for the insight.

adamw


8,139 post(s)
#05-May-18 13:57

403 Forbidden means that the server does not want to return data for some reason. It's not that data is not getting parsed correctly, it's that it is not getting returned. The dataport asks the server for the contents of the URL and the server says "no".

This might be related to cookies or to a user agent string or to anything else. Sometimes the requirements are spelled out in the documentation somewhere on the server. If you can share the API key with tech support, they might be able to determine what specifically the culprit is.

As a very quick try, try launching the default browser (the one launched if you invoke Help - Web Site in 9) and getting to the data in that browser. This will set up cookies for 9, cookies are browser-specific and 9 uses cookies for the default browser. After that, try getting to the data from 9.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.