Sandbox API Login: return values?
i try to login via a python script, after some struggeling with the certificates i get a return code 200.
but when i try to parse the return value it's not a json object (or structure) it's html.
login-request and check response:
response = requests.post(loginURL, json=login_data)
print(f"response status code : {response.status_code}")
if response.status_code == 200:
print(response.text)
try:
json_data = response.json()
for key in json_data:
print(key)
except ValueError as e:
print("some ERROR raised:")
print(e)
and the print of the response ist html:
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8">
<title>FortiSandbox</title>
<base href="/ng/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>@charset "UTF-8";body{font-family:Lato,Helvetica,Arial,sans-serif}body{font-weight:var(--nu-theme-dimension-normal-font-weight)}body{background-color:rgb(var(--nu-theme...................
(and much more, but no values, like a sessionid oder similar)
any hints where i went wrong?
thanks a lot!
