---
title: ScriptableHandler
description: Creates a response to a request by executing a script.
component: pinggateway
version: 2026
page_id: pinggateway:reference:ScriptableHandler
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/ScriptableHandler.html
revdate: 2025-06-02T18:01:47Z
section_ids:
  ScriptableHandler-usage: Usage
  ScriptableHandler-properties: Properties
  ScriptableHandler-moreinfo: More information
---

# ScriptableHandler

Creates a response to a request by executing a script.

Scripts must return either a [Promise\<Response, NeverThrowsException>](../_attachments/apidocs/org/forgerock/util/promise/Promise.html) or a [Response](../_attachments/apidocs/org/forgerock/http/protocol/Response.html).

This section describes the usage of ScriptableHandler. For information about script properties, available global objects, and automatically imported classes, see [PingGateway scripts](Scripts.html).

## Usage

```json
{
    "name": string,
    "type": "ScriptableHandler",
    "config": {
        "type": configuration expression<string>,
        "file": configuration expression<string>, // Use either "file"
        "source": [ string, ... ],                // or "source", but not both
        "args": map,
        "clientHandler": Handler reference
    }
}
```

## Properties

For information about properties for ScriptableHandler, refer to [PingGateway scripts](Scripts.html).

## More information

[org.forgerock.openig.handler.ScriptableHandler](../_attachments/apidocs/org/forgerock/openig/handler/ScriptableHandler.html)
