Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(sdk-js): link the session before the example send
Yudhi Armyndharis7e7b66095754
diff --git a/sdk/javascript/src/client.ts b/sdk/javascript/src/client.tsindex 2bdb6a7a6..7aa9194ae 100644--- a/sdk/javascript/src/client.ts+++ b/sdk/javascript/src/client.ts@@ -16,6 +16,8 @@* // Sessions are addressed by the UUID that create() returns, not by name.* const session = await client.sessions.create({ name: 'my-session' });* await client.sessions.start(session.id);+ * // Link the account before sending: scan sessions.getQrCode or use sessions.requestPairingCode,+ * // then wait for status 'ready'. An unlinked session answers the send with 409.* await client.messages.sendText(session.id, {* chatId: '[email protected]',* text: 'Hello from the OpenWA SDK!',diff --git a/sdk/javascript/src/index.ts b/sdk/javascript/src/index.tsindex b9ff1a385..19af62788 100644--- a/sdk/javascript/src/index.ts+++ b/sdk/javascript/src/index.ts@@ -15,6 +15,8 @@* // Sessions are addressed by the UUID that create() returns, not by name.* const session = await client.sessions.create({ name: 'my-session' });* await client.sessions.start(session.id);+ * // Link the account before sending: scan sessions.getQrCode or use sessions.requestPairingCode,+ * // then wait for status 'ready'. An unlinked session answers the send with 409.* const result = await client.messages.sendText(session.id, {* chatId: '[email protected]',* text: 'Hello from the OpenWA SDK!',