AnsweredAssumed Answered

Anyone have a curl example for the generateToken REST?

Question asked by tggagne on Sep 10, 2014
Latest reply on Jul 28, 2017 by carlosnantes

The documentation is unclear exactly how to send the username, password, and other parameters in the REST POST.


The documentation is here : <ArcGIS REST API >


I've tried


curl -X POST https:///


curl -X POST -d username=me -d password=XX -d client=ip -d


curl -X POST -d @ebody

where ebody is a file containing





and variations on all of them.


Does anyone have a working example, or explain what to use for the base url?  Does it matter?


Sometimes I'll get a 404, other times I get an HTML response:




<title>ArcGIS Portal Directory</title>

<link href="/sharing/rest/files/gw.css" rel="stylesheet" type="text/css"/>




<div class="gwDiv">

<table class="navTable" width="100%"><tr><td class="breadcrumbs">ArcGIS Portal Directory</td></tr></table>

<tr valign="top">



<a href="" >API Reference</a>