> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/development-guide/javascript/in-app-message.md).

# 인앱 메시지

{% hint style="info" %}
JavaScript SDK 11.15.0 버전 이상에서 지원하는 기능입니다.
{% endhint %}

## 인앱메시지 개발자 가이드

#### HackleInAppMessage

```typescript
interface HackleInAppMessage {
  key: number
}
```

* 인앱메시지의 키를 반환합니다.

#### HackleInAppMessageView

```typescript
interface HackleInAppMessageView {
  close(): void
  inAppMessage: HackleInAppMessage // 11.48.0+
}
```

* `close()` 를 호출하여 인앱메시지를 리스너 함수 내에서 직접 닫을 수 있습니다.

### Methods

#### getDisplayedInAppMessageView

```javascript
const hackleClient = createInstance("YOUR_SDK_KEY");

const view = hackleClient.getDisplayedInAppMessageView();
if (view !== null) {
  view.close(); // 현재 표시 중인 인앱메시지를 닫습니다.
}
```

* 현재 브라우저에 표시된 인앱메시지를 반환합니다.
* 반환 타입은 `HackleInAppMessageView | null` 입니다.
  * 현재 표시 중인 인앱메시지가 존재하지 않는 경우 `null` 을 반환합니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.hackle.io/development-guide/javascript/in-app-message.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
