0 Replies Latest reply on Feb 25, 2015 2:46 AM by totti10

    Log in failed using API

    totti10

      Hi all,

       

      I wrote a simple code to login using API, but received a status_code 415. My code is below:

       

      >>> import sys, json, requests

      >>> print("Create a HTTP Session...")

      Create a HTTP Session...

      >>> s = requests.session()

      >>> r = s.post('http://localhost:8082/5.8/login?authenticationkey=RTCZkFtgqUCkHqHzmtJ70001')

      >>> print("Status Code: %s " % r.status_code)

      Status Code: 415

      >>> print(r.status_code)

      415

      415 status_code is HTTP Error 415 Unsupported media type

       

      The authenticationkey is correct.

      Can anyone fix this?

       

      Thanks and Regards!