On Mon, Jan 28, 2019 at 3:20 AM murat <grupsiteonur@gmail.com> wrote:
Hi,

I'ım connection to a remote windows using guacamole rdp client. I want to
create a "Sharing Profile" programatically using JAVA.

Firstly, i think the user need some permissions like "ADMINISTER" and
"CREATE_SHARING_PROFILE"

when i try to set these permissions, i get "Permission denied" error.

You'll probably have to describe in a bit more detail exactly what you're doing and where it's failing.  You should be able to do this programatically, in Java, but you'll need to do it the right way.
 

How can i change the permissions of a user programatically?

The short answer is:
- POST login credentials to /api/tokens and obtain a login token for a user that already has Administer permissions.
- Use the correct endpoint to set permissions on the user who you want to have access.
- DELETE to /api/tokens with the token you want to delete.
- POST to /api/tokens with the user creating the sharing profile and obtain a login token.
- Use that token value to access the endpoint that creates the sharing profile.

-Nick