> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperbeam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set User Permissions

<Warning>This endpoint is deprecated, please use [addRoles](https://docs.hyperbeam.com/rest-api/session/add-roles) and [removeRoles](https://docs.hyperbeam.com/rest-api/session/remove-roles) instead</Warning>

## Parameters

<ParamField body="priority" type="integer" default={0}>
  Higher value = higher priority. Users with a higher priority will preempt the
  control of lower priority users.
</ParamField>

<ParamField body="idle_timeout" type="integer" default={0}>
  Number of milliseconds until a user is considered "idle". Once a user is
  considered idle, they no longer preempt lower priority users until they
  interact with the virtual browser again.
</ParamField>

<ParamField body="control_disabled" type="boolean" default="{control_disable_default}">
  If control\_disabled = true, all control input (mouse movements, keyboard
  presses) will be ignored. Note that disabling control does not restrict access
  to any APIs that require admin tokens.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST -H 'Authorization: Bearer <your-api-key>' \
      <base_url>/setPermissions -d '["<user_id>", {"control_disabled": false, "control_exclusive": true}]'
  ```
</RequestExample>

The request body mirrors the function signature of setPermissions(userId, permissions) from the [JavaScript SDK.](/client-sdk/javascript)
