**@openfin/web-interop** • [API](../../../README.md)

***

[@openfin/web-interop](../../../README.md) / [@openfin/web-interop](../README.md) / connect

# Function: connect()

> **connect**(`connectionConfig`): `Promise`\<`Fin`\<`"external connection"`\>\>

## connect(connectionConfig: ConnectionConfig)
Establishes a connection to an OpenFin Web Interop Broker, returning a fin object that supports a subset of APIS.

### Supported APIs

* fin.InterApplicationBus.Channels
* fin.Interop
* fin.me.identity

## Parameters

• **connectionConfig**: [`ConnectionConfig`](../type-aliases/ConnectionConfig.md)

Config used to initialise the connection

## Returns

`Promise`\<`Fin`\<`"external connection"`\>\>

Fin api object

## Throws

If the connection to the broker fails.

## Throws

If the connection elapses the configured timeout

## Throws

If the provided InheritModeConnectConfig.validateOptions returns false

## Throws

If connection inheritance is enabled but the current browsing context is not rendered in an `<of-view>` element and no ConnectionConfig.options are provided.
