# IRPCVaultExtensionMethods.ExecuteExtensionMethod

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) > [Vault extension methods](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultExtensionMethods/index.md)

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

Badges: `Vault API / standard` `write` `session` `idempotent` `returns metadata structure version`

Runs an event handler method by name. In new code use RunExtensionMethod.

- **Service:** [Vault extension methods](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultExtensionMethods/index.md) `MFiles.IRPCVaultExtensionMethods`
- **gRPC method:** `/MFiles.IRPCVaultExtensionMethods/ExecuteExtensionMethod`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/execute-extension-method`
- **Request:** [`ExecuteExtensionMethodRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultExtensionMethods/ExecuteExtensionMethod/index.md#request)
- **Response:** [`ExecuteExtensionMethodResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultExtensionMethods/ExecuteExtensionMethod/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Remarks

- Same as [RunExtensionMethod](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultExtensionMethods/RunExtensionMethod/index.md) with
  an all-zero `application_id` and uncompressed input.
- An unknown name fails with "Not found. (<name>)".

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

## Request: ExecuteExtensionMethodRequest

> 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_identifier` | `string` | The name of the VaultExtensionMethod event handler. |
| `input` | `string` | The input passed to the method. |

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

## Response: ExecuteExtensionMethodResponse

> 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 |
|---|---|---|
| `output` | `string` | The output of the method. |

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

## Related methods

- [RunExtensionMethod](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultExtensionMethods/RunExtensionMethod/index.md): Runs a vault extension method, either an event handler method or an application extension method, with optional compression of the input and output.
- [ExecuteExtensionMethodEx](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultExtensionMethods/ExecuteExtensionMethodEx/index.md): Runs an extension method of a vault application. In new code use RunExtensionMethod.
