# \_setAppPermissions

Sets the application permissions of the specified User, controlling what they can do on the mobile application.

### Parameters

#### id

The ID of the User.

#### val

The permission value as a bit field. Possible values are defined below. Multiple permissions are set by adding together their respective permission values.

Customers Section: Set to 1 to enable the User to access the customer section. Job Lock: Set to 2 to prevent the User from creating new appointments. Quick Complete: Set to 4 to enable the User to skip setting advanced options such as Mileage, Time Spent, Send PDF, Schedule New Appointment, etc. Customer List: Set to 8 to download the full customer database to the application instead of prioritising customers associated with the User (for their jobs, tasks, etc.). Be warned that this may slow the login process. Dropbox: Set to 16 to enable Dropbox integration, allowing the User to upload photos and videos to a Dropbox account. Archives: Set to 32 to download jobs as archives. Be warned that this may slow the login process if the User's account has a large number of jobs. Job Rejection: Set to 64 to prevent the User from rejecting jobs. Job Change User: Set to 128 to prevent the User from reassigning jobs to other users. Edit Customer on Job Page: Set to 256 to prevent the User from editing customers of the Job Overview page. Assets Section: Set to 512 to prevent the User from accessing the Assets section.

### Example

This example sets the properties for Customers Section, Job Lock and Archives. FM\_api('User\_setAppPermissions', \['id' => '123', 'val' => '35']);

### Results

#### On Success

```
{'ok':1}
```

#### On Failure

If the User is not logged in: {'error':'not logged in'}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/user/_setapppermissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
