---
title: "Interface IScriptsClient"
slug: "sdk--stylelabs.m.sdk.clients.iscriptsclient"
abstract: ""
---
# Interface IScriptsClient

Contains functionality to execute scripts.

## Namespace: StylelabsStylelabs.MSdkClients

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public interface IScriptsClient
```

## Methods

### ExecuteActionScriptAsync(string, JToken)

Executes specified action script.

#### Declaration

```csharp
Task<JToken> ExecuteActionScriptAsync(string identifier, JToken arguments = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | identifier | The identifier of the script. |
| JToken | arguments | The arguments to pass to the script. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>JToken | The result of the script. If the script didn't set a result, null is returned. |

#### Exceptions

| Type | Condition |
| --- | --- |
| [NotFoundException](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.exceptions.notfoundexception.html) | The script with the specified `identifier` could not be found. |
| [ScriptException](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.exceptions.scriptexception.html) | Something went wrong during the execution of the script. |
