# IRPCClientScript.GetDownloadSessionIdOfScriptApplicationFile

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Client scripts and UI extension applications](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/GetDownloadSessionIdOfScriptApplicationFile/

Badges: `Vault API / standard` `read` `session` `idempotent`

Starts downloading one file of a UI extension application of the new M-Files clients.

- **Service:** [Client scripts and UI extension applications](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/index.md) `MFiles.IRPCClientScript`
- **gRPC method:** `/MFiles.IRPCClientScript/GetDownloadSessionIdOfScriptApplicationFile`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-download-session-id-of-script-application-file`
- **Request:** [`GetDownloadSessionIdOfScriptApplicationFileRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/GetDownloadSessionIdOfScriptApplicationFile/index.md#request)
- **Response:** [`GetDownloadSessionIdOfScriptApplicationFileResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/GetDownloadSessionIdOfScriptApplicationFile/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** read
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Used by the M-Files clients to load UI extension applications; applications rarely call it.
- Only for client applications that support `EXT_APPLICATION_PLATFORM_VNEXT`; others fail with
  "The script application is not a client app or the platform is not supported.".
- `file_name` is relative to the application folder. Absolute paths and `..` components are
  rejected; a file that does not exist fails with "Not found.".
- Read the file with
  [DownloadScriptApplicationFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/DownloadScriptApplicationFile_ReadBlock/index.md).

<a id="request"></a>

## Request: GetDownloadSessionIdOfScriptApplicationFileRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `script_application` | `string` | The GUID of the application. |
| `file_name` | `string` | The path of the file inside the application, for example `script\helper.js`. |

<a id="response"></a>

## Response: GetDownloadSessionIdOfScriptApplicationFileResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `download_id` | `int32` | The ID of the download. |
| `file_size` | `int64` | The size of the file in bytes. |

<a id="related"></a>

## Related methods

- [DownloadScriptApplicationFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/DownloadScriptApplicationFile_ReadBlock/index.md): Reads the next block of an application download.
