You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guacamole 1.4.0 version.
I am using python requests to make API call to generate token which I plan to use to make other API calls.
>>> import requests
>>> payload = {'username': 'guacadmin', 'contentType': 'application/x-www-form-urlencoded', 'password': 'guacadmin', 'Content-type': 'application/x-www-form-urlencoded'}
url = 'http://127.0.0.1:8080/api/tokens'
>>> response = requests.post(url,data=payload)
>>> print(response.text)
<!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/8.5.73</h3></body></html>
>>> response.ok
False
>>> response.status_code
404
Any help is appreciated.
Thanks
The text was updated successfully, but these errors were encountered:
I shortly after discovered this is because the path should be api/tokens and not guacamole/api/tokens as the example page shows. Additionaly in form encode you have use = and not : which is for json encoding
Hi,
Guacamole 1.4.0 version.
I am using python requests to make API call to generate token which I plan to use to make other API calls.
Any help is appreciated.
Thanks
The text was updated successfully, but these errors were encountered: