Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use services requiring an API Login #47

Open
anakaine opened this issue Mar 9, 2018 · 6 comments
Open

Unable to use services requiring an API Login #47

anakaine opened this issue Mar 9, 2018 · 6 comments

Comments

@anakaine
Copy link

anakaine commented Mar 9, 2018

Where an API login page is presented the esridump tool ceases to function.
There are cases where a service is accessed using legitimate credentials, but the esridump tool does not have a facility for authentication such as either username/password, or token.

@iandees
Copy link
Member

iandees commented Mar 9, 2018

Thanks for reporting this. From what I've been able to discern, the login process gives you an API token that can then be used by the tool as-is. I've never had to use a login though, so I'm not sure how it should work. I'd appreciate a pull request or an example layer that requires a password.

@anakaine
Copy link
Author

anakaine commented Mar 9, 2018

I'll have a sample service for you soon.

Please keep an eye on your gmail for details

@iandees
Copy link
Member

iandees commented Mar 10, 2018

I think I'd prefer to keep login functionality out of pyesridump. You can use the server's "generateToken" endpoint (/arcgis/tokens/generateToken) to create an API token and then pass that in to esri2geojson command line or in the extra_query_args param in the EsriDumper object.

The login process requires that the user pass in a new URL to esridump system (the URL to generate tokens can be different and isn't deterministic).

I think I'll update the documentation/readme to point that process out.

@marhensa
Copy link

marhensa commented Nov 28, 2022

any update of documentation to use mapservice with a token?

edit. i get it, it's something like this:

esri2geojson -p token=xxxxlongstringsoftokensxxx https://some.site/server/rest/services/folders/folder/MapServer/0 output.geojson

@anakaine
Copy link
Author

anakaine commented Nov 28, 2022 via email

@iandees
Copy link
Member

iandees commented Nov 30, 2022

something like this:

esri2geojson -p token=xxxxlongstringsoftokensxxx https://some.site/server/rest/services/folders/folder/MapServer/0 output.geojson

Yep, pass the token you retrieved through other means as a URL parameter using the -p argument to esri2geojson.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants