I'd like to generate token for arcgisonline hosted service but I can figure out the endpoint and how to construct the request.
Is ithttps://www.arcgis.com/sharing/rest/generateToken?username=username&password=password&expiration=60 or https://services2.arcgis.com/xxxxxxxxxxxxxx/arcgis/tokens/generateToken?username=username&password=password&expiration=60 or ...../arcgis/tokens?request=getToken&username=<usr>&password=<usr>&expiration=<token_lifespan
What is the endpoint and how would I construct the parameters. I'm using Java HttpUrlConnection? arcgisrest