*** id: 2f5cf581-d38a-4dec-8b4b-a42ec0a05aaf title: connect slug: /node/reference/realtime-client/connect description: connect method for the Realtime Client. max-toc-depth: 3 ---------------- ### connect ▸ **connect**(): `Promise` The client automatically connects when created. You only need to call this method if you have previously disconnected. Connects this client to the SignalWire Realtime API. The client will start receiving events. #### Returns `Promise` - Resolves when the connection is established. #### Example ```javascript import { SignalWire } from "@signalwire/realtime-api"; const client = await SignalWire({ project: "ProjectID Here", token: "Token Here" }); await client.connect().then(() => { console.log("connected"); }); ```