Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(sdk): link the account before sending in source quickstarts
Yudhi Armyndharisd8444218b027
diff --git a/sdk/go/client.go b/sdk/go/client.goindex fc4989449..abb7b505e 100644--- a/sdk/go/client.go+++ b/sdk/go/client.go@@ -18,6 +18,8 @@// if _, err := client.Sessions.Start(ctx, session.ID); err != nil {// log.Fatal(err)// }+// // Link the account before sending: scan Sessions.QRCode or use Sessions.RequestPairingCode,+// // then wait for status "ready". An unlinked session answers the send with 409.// res, err := client.Messages.SendText(ctx, session.ID, openwa.SendTextRequest{// ChatID: "[email protected]",// Text: "Hello from the OpenWA Go SDK!",diff --git a/sdk/go/example_test.go b/sdk/go/example_test.goindex 52c4e4f5d..613e8b446 100644--- a/sdk/go/example_test.go+++ b/sdk/go/example_test.go@@ -27,6 +27,8 @@ func ExampleNew() {log.Fatal(err)}+ // Link the account before sending: scan Sessions.QRCode or use Sessions.RequestPairingCode,+ // then wait for status "ready". An unlinked session answers the send with 409.res, err := client.Messages.SendText(ctx, session.ID, openwa.SendTextRequest{ChatID: "[email protected]",Text: "Hello from the OpenWA Go SDK!",diff --git a/sdk/java/src/main/java/com/rmyndharis/openwa/OpenWAClient.java b/sdk/java/src/main/java/com/rmyndharis/openwa/OpenWAClient.javaindex 7962e0e88..082697df3 100644--- a/sdk/java/src/main/java/com/rmyndharis/openwa/OpenWAClient.java+++ b/sdk/java/src/main/java/com/rmyndharis/openwa/OpenWAClient.java@@ -48,6 +48,8 @@ import java.util.Map;* // Sessions are addressed by the UUID that create() returns, not by name.* SessionResponse session = client.sessions.create(CreateSessionRequest.builder().name("my-session").build());* 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.* client.messages.sendText(session.id(),* SendTextRequest.builder().chatId("[email protected]").text("Hello!").build());* }</pre>diff --git a/sdk/php/src/Client.php b/sdk/php/src/Client.phpindex f7c54bc3a..7f9e0542a 100644--- a/sdk/php/src/Client.php+++ b/sdk/php/src/Client.php@@ -42,6 +42,8 @@ use OpenWA\Resources\WebhooksResource;* // Sessions are addressed by the UUID that create() returns, not by name.* $session = $client->sessions->create(['name' => 'my-session']);* $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.* $result = $client->messages->sendText($session['id'], [* 'chatId' => '[email protected]',* 'text' => 'Hello from the OpenWA PHP SDK!',diff --git a/sdk/python/openwa/__init__.py b/sdk/python/openwa/__init__.pyindex 98a016a20..52a1475d6 100644--- a/sdk/python/openwa/__init__.py+++ b/sdk/python/openwa/__init__.py@@ -15,6 +15,8 @@ Example usage::# Sessions are addressed by the UUID that create() returns, not by name.session = client.sessions.create({"name": "my-session"})client.sessions.start(session["id"])+ # Link the account before sending: scan sessions.get_qr_code or use sessions.request_pairing_code,+ # then wait for status "ready". An unlinked session answers the send with 409.result = client.messages.send_text(session["id"], {"chatId": "[email protected]","text": "Hello from the OpenWA Python SDK!",diff --git a/sdk/python/openwa/client.py b/sdk/python/openwa/client.pyindex 4f0141e85..d8d599f33 100644--- a/sdk/python/openwa/client.py+++ b/sdk/python/openwa/client.py@@ -14,6 +14,8 @@ transport) and exposes domain resources as properties::# Sessions are addressed by the UUID that create() returns, not by name.session = client.sessions.create({"name": "my-session"})client.sessions.start(session["id"])+ # Link the account before sending: scan sessions.get_qr_code or use sessions.request_pairing_code,+ # then wait for status "ready". An unlinked session answers the send with 409.client.messages.send_text(session["id"], {"chatId": "[email protected]","text": "Hello from the OpenWA SDK!",