From user-return-4917-archive-asf-public=cust-asf.ponee.io@guacamole.apache.org Mon Jan 7 12:13:22 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 24BAE180647 for ; Mon, 7 Jan 2019 12:13:21 +0100 (CET) Received: (qmail 99541 invoked by uid 500); 7 Jan 2019 11:13:21 -0000 Mailing-List: contact user-help@guacamole.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@guacamole.apache.org Delivered-To: mailing list user@guacamole.apache.org Received: (qmail 99531 invoked by uid 99); 7 Jan 2019 11:13:21 -0000 Received: from mail-relay.apache.org (HELO mailrelay1-lw-us.apache.org) (207.244.88.152) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2019 11:13:21 +0000 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id 0E15143B8 for ; Mon, 7 Jan 2019 11:13:20 +0000 (UTC) Received: by mail-ed1-f47.google.com with SMTP id a20so482958edc.8 for ; Mon, 07 Jan 2019 03:13:19 -0800 (PST) X-Gm-Message-State: AJcUukfd+XYcrBdayswkr5AFHZv2wz+8RgklefODX5Bx/PNL+5CTMdJN tEQoVgNlZHT2nB+VSJMxHxn8N8UUia2qt/ijjqU= X-Google-Smtp-Source: ALg8bN7Qz4fFn9uDBUCdPWOrdtxo1jgMg7Q0zUw+GqB+yKL/j2k8zQbfdkHhmzmmXtIq2iQUuTBkrRZRjTA143NksAQ= X-Received: by 2002:a50:c299:: with SMTP id o25mr29118053edf.281.1546859598859; Mon, 07 Jan 2019 03:13:18 -0800 (PST) MIME-Version: 1.0 References: <1546591755272-0.post@n4.nabble.com> In-Reply-To: From: Nick Couchman Date: Mon, 7 Jan 2019 06:13:06 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Is there a way to get the list of guacamole users thru API? To: user@guacamole.apache.org, olivier.chamberaud@gmail.com Content-Type: multipart/alternative; boundary="000000000000e854ec057edc5085" --000000000000e854ec057edc5085 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 7, 2019 at 6:01 AM Olivier Chamberaud < olivier.chamberaud@gmail.com> wrote: > Hi, > > I was able to get information thru curl & php but the token has a time to > live of 60 minutes. > > Is there a way to login to Guacamole with username/password and get a > valid token? > if yes, can you please provide a sample URL on the way to do it (I've > tried > https://baseURL/guacamole/api/tokens/get?username=username&password=password > without succes) > or better a way to set a token that never expires (until revocation)? > Please see: https://github.com/necouchman/guacamole-python/blob/9ac3f9ff7728d976d6107809700cbdd6f0c97fdd/guacamole-cli.py#L21-L32 I do not believe you can do it with an HTTP GET request, but you can do it with the HTTP POST request as used in the above code. -Nick --000000000000e854ec057edc5085 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jan 7, 2019 at 6:01 AM Olivier Ch= amberaud <olivier.chambe= raud@gmail.com> wrote:
Hi,

I was able to get informati= on thru curl & php but the token has a time to live of 60 minutes.

Is there a way to login to Gu= acamole with username/password and get a valid token?
=C2=A0= if yes, can you please provide a sample URL on the way to do it (I've = tried https://baseURL/guacamole/api= /tokens/get?username=3Dusername&password=3Dpassword without succes)=
or better a way to set a token that never expires (until re= vocation)?

Please see:


= I do not believe you can do it with an HTTP GET request, but you can do it = with the HTTP POST request as used in the above code.

<= div>-Nick
--000000000000e854ec057edc5085--