zernio-sdk 0.0.734 → 0.0.736
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/ConnectApi.md +1 -1
- data/docs/ConnectWhatsAppCredentials200Response.md +2 -0
- data/docs/ConnectWhatsAppCredentials200ResponseAccount.md +6 -2
- data/docs/InboxWebhookMessage.md +1 -1
- data/docs/WebhookPayloadMessageMessage.md +1 -1
- data/docs/WebhookPayloadMessageSentMessage.md +1 -1
- data/lib/zernio-sdk/api/connect_api.rb +2 -2
- data/lib/zernio-sdk/models/connect_whats_app_credentials200_response.rb +11 -1
- data/lib/zernio-sdk/models/connect_whats_app_credentials200_response_account.rb +27 -7
- data/lib/zernio-sdk/models/inbox_webhook_message.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_message.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_sent_message.rb +1 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +18 -2
- data/spec/api/connect_api_spec.rb +1 -1
- data/spec/models/connect_whats_app_credentials200_response_account_spec.rb +13 -1
- data/spec/models/connect_whats_app_credentials200_response_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63ca4050c220902da4e303732c62730c080426df1b5779d07f880d5e8bb45f02
|
|
4
|
+
data.tar.gz: b4c23c0f20c1ff9fbb9514d4f09847b0463019c69ef870e31eac94f41fd81330
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1fff3ac80df8810b1675b28aee89741ea1845acafb0c0dde26667881f58842fd515f9f829445cad95cc23e7121f03a7dd226bc3fe2c1f62d5f242d9bbd42ba05
|
|
7
|
+
data.tar.gz: 5c42494461e13f84907cd5e3fa40500d54481d6759890428b902e6ff171cae18fc98f72d77c31eebff64527a2341f33b45ba3d0e0e714349e132c1b08385b06f
|
data/docs/ConnectApi.md
CHANGED
|
@@ -631,7 +631,7 @@ end
|
|
|
631
631
|
|
|
632
632
|
Connect WhatsApp via credentials
|
|
633
633
|
|
|
634
|
-
Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number)
|
|
634
|
+
Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
|
|
635
635
|
|
|
636
636
|
### Examples
|
|
637
637
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **message** | **String** | | [optional] |
|
|
8
8
|
| **registration_warning** | **String** | Present when the account was created but Meta rejected the Cloud API registration. The number cannot send messages until this is resolved. | [optional] |
|
|
9
|
+
| **webhook_notice** | **String** | Present when the WABA webhook subscription (with the Zernio override callback) succeeded. Explains the delivery cutover and warns against unsubscribing the app from the WABA afterward. | [optional] |
|
|
9
10
|
| **account** | [**ConnectWhatsAppCredentials200ResponseAccount**](ConnectWhatsAppCredentials200ResponseAccount.md) | | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
@@ -16,6 +17,7 @@ require 'zernio-sdk'
|
|
|
16
17
|
instance = Zernio::ConnectWhatsAppCredentials200Response.new(
|
|
17
18
|
message: null,
|
|
18
19
|
registration_warning: null,
|
|
20
|
+
webhook_notice: null,
|
|
19
21
|
account: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
| **username** | **String** | Display phone number | [optional] |
|
|
10
10
|
| **display_name** | **String** | Meta-verified business name | [optional] |
|
|
11
11
|
| **is_active** | **Boolean** | | [optional] |
|
|
12
|
-
| **
|
|
12
|
+
| **phone_number** | **String** | The connected phone number | [optional] |
|
|
13
|
+
| **verified_name** | **String** | Meta-verified business name for the phone number | [optional] |
|
|
14
|
+
| **quality_rating** | **String** | Meta quality rating for the phone number (e.g. GREEN, YELLOW, RED, UNKNOWN) | [optional] |
|
|
13
15
|
|
|
14
16
|
## Example
|
|
15
17
|
|
|
@@ -22,7 +24,9 @@ instance = Zernio::ConnectWhatsAppCredentials200ResponseAccount.new(
|
|
|
22
24
|
username: null,
|
|
23
25
|
display_name: null,
|
|
24
26
|
is_active: null,
|
|
25
|
-
|
|
27
|
+
phone_number: null,
|
|
28
|
+
verified_name: null,
|
|
29
|
+
quality_rating: null
|
|
26
30
|
)
|
|
27
31
|
```
|
|
28
32
|
|
data/docs/InboxWebhookMessage.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **text** | **String** | Message text content (retained on deleted messages for API consumers; Zernio dashboard UI hides this) | |
|
|
13
13
|
| **attachments** | [**Array<InboxWebhookMessageAttachmentsInner>**](InboxWebhookMessageAttachmentsInner.md) | | |
|
|
14
14
|
| **sender** | [**InboxWebhookMessageSender**](InboxWebhookMessageSender.md) | | |
|
|
15
|
-
| **sent_at** | **Time** |
|
|
15
|
+
| **sent_at** | **Time** | When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order. | |
|
|
16
16
|
| **is_read** | **Boolean** | | |
|
|
17
17
|
|
|
18
18
|
## Example
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **text** | **String** | Message text content | |
|
|
13
13
|
| **attachments** | [**Array<WebhookPayloadMessageMessageAttachmentsInner>**](WebhookPayloadMessageMessageAttachmentsInner.md) | | |
|
|
14
14
|
| **sender** | [**WebhookPayloadMessageMessageSender**](WebhookPayloadMessageMessageSender.md) | | |
|
|
15
|
-
| **sent_at** | **Time** |
|
|
15
|
+
| **sent_at** | **Time** | When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order. | |
|
|
16
16
|
| **is_read** | **Boolean** | | |
|
|
17
17
|
|
|
18
18
|
## Example
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **text** | **String** | Message text content | |
|
|
13
13
|
| **attachments** | [**Array<WebhookPayloadMessageSentMessageAttachmentsInner>**](WebhookPayloadMessageSentMessageAttachmentsInner.md) | | |
|
|
14
14
|
| **sender** | [**WebhookPayloadMessageSentMessageSender**](WebhookPayloadMessageSentMessageSender.md) | | |
|
|
15
|
-
| **sent_at** | **Time** |
|
|
15
|
+
| **sent_at** | **Time** | When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order. | |
|
|
16
16
|
| **is_read** | **Boolean** | | |
|
|
17
17
|
| **source** | **String** | WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts). Absent on non-WhatsApp platforms. This is not the inbox metadata.source lineage field. | [optional] |
|
|
18
18
|
|
|
@@ -594,7 +594,7 @@ module Zernio
|
|
|
594
594
|
end
|
|
595
595
|
|
|
596
596
|
# Connect WhatsApp via credentials
|
|
597
|
-
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number)
|
|
597
|
+
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
|
|
598
598
|
# @param connect_whats_app_credentials_request [ConnectWhatsAppCredentialsRequest]
|
|
599
599
|
# @param [Hash] opts the optional parameters
|
|
600
600
|
# @return [ConnectWhatsAppCredentials200Response]
|
|
@@ -604,7 +604,7 @@ module Zernio
|
|
|
604
604
|
end
|
|
605
605
|
|
|
606
606
|
# Connect WhatsApp via credentials
|
|
607
|
-
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number)
|
|
607
|
+
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
|
|
608
608
|
# @param connect_whats_app_credentials_request [ConnectWhatsAppCredentialsRequest]
|
|
609
609
|
# @param [Hash] opts the optional parameters
|
|
610
610
|
# @return [Array<(ConnectWhatsAppCredentials200Response, Integer, Hash)>] ConnectWhatsAppCredentials200Response data, response status code and response headers
|
|
@@ -20,6 +20,9 @@ module Zernio
|
|
|
20
20
|
# Present when the account was created but Meta rejected the Cloud API registration. The number cannot send messages until this is resolved.
|
|
21
21
|
attr_accessor :registration_warning
|
|
22
22
|
|
|
23
|
+
# Present when the WABA webhook subscription (with the Zernio override callback) succeeded. Explains the delivery cutover and warns against unsubscribing the app from the WABA afterward.
|
|
24
|
+
attr_accessor :webhook_notice
|
|
25
|
+
|
|
23
26
|
attr_accessor :account
|
|
24
27
|
|
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -27,6 +30,7 @@ module Zernio
|
|
|
27
30
|
{
|
|
28
31
|
:'message' => :'message',
|
|
29
32
|
:'registration_warning' => :'registrationWarning',
|
|
33
|
+
:'webhook_notice' => :'webhookNotice',
|
|
30
34
|
:'account' => :'account'
|
|
31
35
|
}
|
|
32
36
|
end
|
|
@@ -46,6 +50,7 @@ module Zernio
|
|
|
46
50
|
{
|
|
47
51
|
:'message' => :'String',
|
|
48
52
|
:'registration_warning' => :'String',
|
|
53
|
+
:'webhook_notice' => :'String',
|
|
49
54
|
:'account' => :'ConnectWhatsAppCredentials200ResponseAccount'
|
|
50
55
|
}
|
|
51
56
|
end
|
|
@@ -80,6 +85,10 @@ module Zernio
|
|
|
80
85
|
self.registration_warning = attributes[:'registration_warning']
|
|
81
86
|
end
|
|
82
87
|
|
|
88
|
+
if attributes.key?(:'webhook_notice')
|
|
89
|
+
self.webhook_notice = attributes[:'webhook_notice']
|
|
90
|
+
end
|
|
91
|
+
|
|
83
92
|
if attributes.key?(:'account')
|
|
84
93
|
self.account = attributes[:'account']
|
|
85
94
|
end
|
|
@@ -107,6 +116,7 @@ module Zernio
|
|
|
107
116
|
self.class == o.class &&
|
|
108
117
|
message == o.message &&
|
|
109
118
|
registration_warning == o.registration_warning &&
|
|
119
|
+
webhook_notice == o.webhook_notice &&
|
|
110
120
|
account == o.account
|
|
111
121
|
end
|
|
112
122
|
|
|
@@ -119,7 +129,7 @@ module Zernio
|
|
|
119
129
|
# Calculates hash code according to all attributes.
|
|
120
130
|
# @return [Integer] Hash code
|
|
121
131
|
def hash
|
|
122
|
-
[message, registration_warning, account].hash
|
|
132
|
+
[message, registration_warning, webhook_notice, account].hash
|
|
123
133
|
end
|
|
124
134
|
|
|
125
135
|
# Builds the object from hash
|
|
@@ -28,7 +28,13 @@ module Zernio
|
|
|
28
28
|
attr_accessor :is_active
|
|
29
29
|
|
|
30
30
|
# The connected phone number
|
|
31
|
-
attr_accessor :
|
|
31
|
+
attr_accessor :phone_number
|
|
32
|
+
|
|
33
|
+
# Meta-verified business name for the phone number
|
|
34
|
+
attr_accessor :verified_name
|
|
35
|
+
|
|
36
|
+
# Meta quality rating for the phone number (e.g. GREEN, YELLOW, RED, UNKNOWN)
|
|
37
|
+
attr_accessor :quality_rating
|
|
32
38
|
|
|
33
39
|
class EnumAttributeValidator
|
|
34
40
|
attr_reader :datatype
|
|
@@ -60,7 +66,9 @@ module Zernio
|
|
|
60
66
|
:'username' => :'username',
|
|
61
67
|
:'display_name' => :'displayName',
|
|
62
68
|
:'is_active' => :'isActive',
|
|
63
|
-
:'
|
|
69
|
+
:'phone_number' => :'phoneNumber',
|
|
70
|
+
:'verified_name' => :'verifiedName',
|
|
71
|
+
:'quality_rating' => :'qualityRating'
|
|
64
72
|
}
|
|
65
73
|
end
|
|
66
74
|
|
|
@@ -82,7 +90,9 @@ module Zernio
|
|
|
82
90
|
:'username' => :'String',
|
|
83
91
|
:'display_name' => :'String',
|
|
84
92
|
:'is_active' => :'Boolean',
|
|
85
|
-
:'
|
|
93
|
+
:'phone_number' => :'String',
|
|
94
|
+
:'verified_name' => :'String',
|
|
95
|
+
:'quality_rating' => :'String'
|
|
86
96
|
}
|
|
87
97
|
end
|
|
88
98
|
|
|
@@ -128,8 +138,16 @@ module Zernio
|
|
|
128
138
|
self.is_active = attributes[:'is_active']
|
|
129
139
|
end
|
|
130
140
|
|
|
131
|
-
if attributes.key?(:'
|
|
132
|
-
self.
|
|
141
|
+
if attributes.key?(:'phone_number')
|
|
142
|
+
self.phone_number = attributes[:'phone_number']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'verified_name')
|
|
146
|
+
self.verified_name = attributes[:'verified_name']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'quality_rating')
|
|
150
|
+
self.quality_rating = attributes[:'quality_rating']
|
|
133
151
|
end
|
|
134
152
|
end
|
|
135
153
|
|
|
@@ -170,7 +188,9 @@ module Zernio
|
|
|
170
188
|
username == o.username &&
|
|
171
189
|
display_name == o.display_name &&
|
|
172
190
|
is_active == o.is_active &&
|
|
173
|
-
|
|
191
|
+
phone_number == o.phone_number &&
|
|
192
|
+
verified_name == o.verified_name &&
|
|
193
|
+
quality_rating == o.quality_rating
|
|
174
194
|
end
|
|
175
195
|
|
|
176
196
|
# @see the `==` method
|
|
@@ -182,7 +202,7 @@ module Zernio
|
|
|
182
202
|
# Calculates hash code according to all attributes.
|
|
183
203
|
# @return [Integer] Hash code
|
|
184
204
|
def hash
|
|
185
|
-
[account_id, platform, username, display_name, is_active,
|
|
205
|
+
[account_id, platform, username, display_name, is_active, phone_number, verified_name, quality_rating].hash
|
|
186
206
|
end
|
|
187
207
|
|
|
188
208
|
# Builds the object from hash
|
|
@@ -36,6 +36,7 @@ module Zernio
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :sender
|
|
38
38
|
|
|
39
|
+
# When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.
|
|
39
40
|
attr_accessor :sent_at
|
|
40
41
|
|
|
41
42
|
attr_accessor :is_read
|
|
@@ -35,6 +35,7 @@ module Zernio
|
|
|
35
35
|
|
|
36
36
|
attr_accessor :sender
|
|
37
37
|
|
|
38
|
+
# When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.
|
|
38
39
|
attr_accessor :sent_at
|
|
39
40
|
|
|
40
41
|
attr_accessor :is_read
|
|
@@ -35,6 +35,7 @@ module Zernio
|
|
|
35
35
|
|
|
36
36
|
attr_accessor :sender
|
|
37
37
|
|
|
38
|
+
# When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.
|
|
38
39
|
attr_accessor :sent_at
|
|
39
40
|
|
|
40
41
|
attr_accessor :is_read
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -3287,6 +3287,7 @@ components:
|
|
|
3287
3287
|
sentAt:
|
|
3288
3288
|
type: string
|
|
3289
3289
|
format: date-time
|
|
3290
|
+
description: 'When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.'
|
|
3290
3291
|
isRead:
|
|
3291
3292
|
type: boolean
|
|
3292
3293
|
InboxWebhookConversation:
|
|
@@ -3588,6 +3589,7 @@ components:
|
|
|
3588
3589
|
sentAt:
|
|
3589
3590
|
type: string
|
|
3590
3591
|
format: date-time
|
|
3592
|
+
description: 'When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.'
|
|
3591
3593
|
isRead:
|
|
3592
3594
|
type: boolean
|
|
3593
3595
|
conversation:
|
|
@@ -3929,6 +3931,7 @@ components:
|
|
|
3929
3931
|
sentAt:
|
|
3930
3932
|
type: string
|
|
3931
3933
|
format: date-time
|
|
3934
|
+
description: 'When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.'
|
|
3932
3935
|
isRead:
|
|
3933
3936
|
type: boolean
|
|
3934
3937
|
source:
|
|
@@ -20489,6 +20492,12 @@ paths:
|
|
|
20489
20492
|
5. Generate a permanent access token
|
|
20490
20493
|
6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers
|
|
20491
20494
|
7. Get the Phone Number ID from the same page (click on the number)
|
|
20495
|
+
|
|
20496
|
+
Warning: connecting subscribes your own Meta app to this WABA with an override
|
|
20497
|
+
callback that redirects its webhook delivery to Zernio. This WABA's events stop
|
|
20498
|
+
reaching any callback URL you had configured before, immediately and with no
|
|
20499
|
+
overlap window. Do not unsubscribe your app from the WABA afterward: that also
|
|
20500
|
+
cuts off Zernio's delivery, and recovery requires calling this endpoint again.
|
|
20492
20501
|
security:
|
|
20493
20502
|
- bearerAuth: []
|
|
20494
20503
|
requestBody:
|
|
@@ -20533,6 +20542,9 @@ paths:
|
|
|
20533
20542
|
registrationWarning:
|
|
20534
20543
|
type: string
|
|
20535
20544
|
description: 'Present when the account was created but Meta rejected the Cloud API registration. The number cannot send messages until this is resolved.'
|
|
20545
|
+
webhookNotice:
|
|
20546
|
+
type: string
|
|
20547
|
+
description: 'Present when the WABA webhook subscription (with the Zernio override callback) succeeded. Explains the delivery cutover and warns against unsubscribing the app from the WABA afterward.'
|
|
20536
20548
|
account:
|
|
20537
20549
|
type: object
|
|
20538
20550
|
properties:
|
|
@@ -20541,7 +20553,9 @@ paths:
|
|
|
20541
20553
|
username: { type: string, description: Display phone number }
|
|
20542
20554
|
displayName: { type: string, description: Meta-verified business name }
|
|
20543
20555
|
isActive: { type: boolean }
|
|
20544
|
-
|
|
20556
|
+
phoneNumber: { type: string, description: The connected phone number }
|
|
20557
|
+
verifiedName: { type: string, description: Meta-verified business name for the phone number }
|
|
20558
|
+
qualityRating: { type: string, description: 'Meta quality rating for the phone number (e.g. GREEN, YELLOW, RED, UNKNOWN)' }
|
|
20545
20559
|
example:
|
|
20546
20560
|
message: "WhatsApp connected successfully"
|
|
20547
20561
|
account:
|
|
@@ -20550,7 +20564,9 @@ paths:
|
|
|
20550
20564
|
username: "+1 555-123-4567"
|
|
20551
20565
|
displayName: "Acme Corp"
|
|
20552
20566
|
isActive: true
|
|
20553
|
-
|
|
20567
|
+
phoneNumber: "+1 555-123-4567"
|
|
20568
|
+
verifiedName: "Acme Corp"
|
|
20569
|
+
qualityRating: "GREEN"
|
|
20554
20570
|
'400':
|
|
20555
20571
|
description: |
|
|
20556
20572
|
Invalid request. Missing fields, a `pin` that is not 6 digits, or the
|
|
@@ -139,7 +139,7 @@ describe 'ConnectApi' do
|
|
|
139
139
|
|
|
140
140
|
# unit tests for connect_whats_app_credentials
|
|
141
141
|
# Connect WhatsApp via credentials
|
|
142
|
-
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number)
|
|
142
|
+
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
|
|
143
143
|
# @param connect_whats_app_credentials_request
|
|
144
144
|
# @param [Hash] opts the optional parameters
|
|
145
145
|
# @return [ConnectWhatsAppCredentials200Response]
|
|
@@ -61,7 +61,19 @@ describe Zernio::ConnectWhatsAppCredentials200ResponseAccount do
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
describe 'test attribute "
|
|
64
|
+
describe 'test attribute "phone_number"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe 'test attribute "verified_name"' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe 'test attribute "quality_rating"' do
|
|
65
77
|
it 'should work' do
|
|
66
78
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
79
|
end
|
|
@@ -39,6 +39,12 @@ describe Zernio::ConnectWhatsAppCredentials200Response do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "webhook_notice"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
42
48
|
describe 'test attribute "account"' do
|
|
43
49
|
it 'should work' do
|
|
44
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|