Hello everyone
 
I upgraded to 1.4.0 and since then I cannot fetch the API token using this example Python code:
 
######################################################
 
#!/usr/bin/python3
import sys
import json
import requests
import os
 
guac_host = "127.0.0.1"
guac_port = "8080"
guac_api_base = "http://{}:{}/guacamole/api/".format(guac_host, guac_port)
guac_username = "guacadmin"
guac_password = "***PASSWORD***"
 
os.environ['NO_PROXY'] = '127.0.0.1'
 
def get_guac_api_token(guac_username, guac_password):
    api_url = "{0}tokens".format(guac_api_base)
    text_body = "username={0}&password={1}".format(guac_username, guac_password)
    response = requests.post(api_url, data="">
 
    if not response.status_code == 200:
        print(response.status_code)
        print(response.content)
        print("Error acquiring guacamole api-token. Aborting")
        return(None)
 
    json_response = response.content.decode()
    json_response = json.loads(json_response)
    return json_response["authToken"]
 
api_token = get_guac_api_token(guac_username, guac_password)
 
if api_token is None:
    exit(1)
 
######################################################
 
Output is:
 
500
b'{"message":"Unexpected internal error","translatableMessage":{"key":"APP.TEXT_UNTRANSLATED","variables":{"MESSAGE":"Unexpected internal error"}},"statusCode":null,"expected":null,"type":"INTERNAL_ERROR"}'
Error acquiring guacamole api-token. Aborting
 
 
Has there anything changed from 1.3.0 where everything is working fine?
 
Thanks and best wishes
 
Michael
 
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org

Reply via email to