You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Create an Account 


Authentication session for API use

taskcurlinputs
authenticatecurl -X POST -H 'Accept: */*' -H 'Accept-Encoding: gzip, deflate' -H 'Connection: keep-alive' -H 'Content-Length: 63' -H 'Content-Type: application/json' -H 'User-Agent: python-requests/2.19.1' -d '{"password": "******", "identifier": "email"}' --compressed https://greatlakestogulf.org/geostreams/api/authenticate
  • password
  • email
  • url
get token
headers = {"x-auth-token": r.headers["x-auth-token"], "Content-Encoding": "application/json"}



















Authentication session for API use

taskstepdetailsdescriptioncurlpython example
authenticatecreate useruser = {'identifier': 'email', 'password': '******'}

r = requests.post(api_server + '/api/authenticate', data=json.dumps(user), headers={'Content-Type': 'application/json'}

create headersheaders={'Content-Type': 'application/json'}



requesthttps://greatlakestogulf.org/geostreams/api/authenticateadd user and headers to request


get token headers = {"x-auth-token": r.headers["x-auth-token"], "Content-Encoding": "application/json"}

headers = {"x-auth-token": r.headers["x-auth-token"], "Content-Encoding": "application/json"}

add headers to api requests









  • No labels