# Introduction

## API Keys

Users can obtain their API keys by accessing their [dashboard](https://flow.simplemonitors.com).

### Connection

Below, you will find an example on how to create a WebSocket connection:

{% tabs %}
{% tab title="Node" %}

```javascript
import WebSocket from 'ws';

const ws = new WebSocket('wss://ws.flow.simplemonitors.com/ws', {
    perMessageDeflate: false
});
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"github.com/gorilla/websocket"
)

func main() {
	// Set up WebSocket connection URL
	wsURL := "wss://ws.flow.simplemonitors.com/ws"

	// Establish WebSocket connection
	conn, _, err := websocket.DefaultDialer.Dial(wsURL, nil)
	if err != nil {
		fmt.Println("WebSocket connection failed:", err)
		return
	}

	fmt.Println("WebSocket connection established.")

	// Close the WebSocket connection when done
	defer conn.Close()
}

```

{% endtab %}

{% tab title="Python" %}

```python
import websocket

ws = websocket.WebSocketApp('wss://ws.flow.simplemonitors.com/ws', 
                            on_open=lambda ws: print("WebSocket connection established."),
                            on_close=lambda ws: print("WebSocket connection closed."),
                            on_message=lambda ws, message: print("Received message:", message),
                            on_error=lambda ws, error: print("WebSocket error occurred:", error))

ws.run_forever()

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://flow.docs.simplemonitors.com/flow/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
