Request:
POST https://www.arcgis.com/sharing/generateToken HTTP/1.1
Host: www.arcgis.com
Content-Type: application/x-www-form-urlencoded
f=json&username=USERNAME&password=PASSWORD&client=requestip
Response:
HTTP/1.1 200 OK
Date: Thu, 01 Mar 2018 09:53:04 GMT
Content-Type: text/plain;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Origin
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Vary: Accept-Encoding, User-Agent
X-Robots-Tag: noindex
{"token":"TOKEN","expires":1519905184244,"ssl":false}