# Function: receiveConnectRequest()

```ts
function receiveConnectRequest(timeoutMs?): Promise<IncomingRequest | null>;
```

Defined in: [packages/core/src/session/connect.ts:767](https://github.com/leifriksheim/minca/blob/main/core/src/session/connect.ts#L767)

Waits for the app that opened this page to say what it wants. It says hello
once, and listens long: on a phone the app's tab behind this one may not run
for a while, and its request (which it repeats) comes when it does.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `timeoutMs?` | `number` |

## Returns

`Promise`\<[`IncomingRequest`](https://minca.dev/api/session/interfaces/IncomingRequest.md) \| `null`\>

The request, or null when this page was not opened by an app, the app's window closed, or none came in time
