zernio-sdk 0.0.542 → 0.0.544
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/README.md +1 -1
- data/docs/ListSmsRegistrations200ResponseRegistrationsInner.md +2 -0
- data/docs/WhatsAppApi.md +72 -0
- data/lib/zernio-sdk/api/whats_app_api.rb +70 -0
- data/lib/zernio-sdk/models/list_sms_registrations200_response_registrations_inner.rb +12 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +0 -1
- data/openapi.yaml +40 -5
- data/spec/api/whats_app_api_spec.rb +13 -0
- data/spec/models/list_sms_registrations200_response_registrations_inner_spec.rb +6 -0
- metadata +1 -5
- data/docs/InboxApi.md +0 -79
- data/lib/zernio-sdk/api/inbox_api.rb +0 -92
- data/spec/api/inbox_api_spec.rb +0 -48
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1696279b128c04c6ecdd3a8e7db97b68cdc738ec46aa418f374d3ef58049285b
|
|
4
|
+
data.tar.gz: 13dc0f1c6b80ef71a4c9f8ec59ee3017bf5df69994c5eee5bcebb0b51ad4a19f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 680e23fc5681b43c12f4ad664536506dbe261b1b210b1f1b78a57ad8c7b08f434902ba9cb3cb9898c53a9fc260ea8e6a91d93d6086e8ddd129cf0ca969904c1d
|
|
7
|
+
data.tar.gz: bfe7774b76501dd4a0f315e0eceff1a8b53949c3dbb5674e5f5a75e4a2e25395c154f4532f071862d638d204a369cb85b6380e0edada5a3c704a572389921778
|
data/README.md
CHANGED
|
@@ -321,7 +321,6 @@ Class | Method | HTTP request | Description
|
|
|
321
321
|
*Zernio::GMBVerificationsApi* | [**fetch_google_business_verification_options**](docs/GMBVerificationsApi.md#fetch_google_business_verification_options) | **POST** /v1/accounts/{accountId}/gmb-verifications/options | Fetch verification options
|
|
322
322
|
*Zernio::GMBVerificationsApi* | [**get_google_business_verifications**](docs/GMBVerificationsApi.md#get_google_business_verifications) | **GET** /v1/accounts/{accountId}/gmb-verifications | Get verification state
|
|
323
323
|
*Zernio::GMBVerificationsApi* | [**start_google_business_verification**](docs/GMBVerificationsApi.md#start_google_business_verification) | **POST** /v1/accounts/{accountId}/gmb-verifications | Start a verification
|
|
324
|
-
*Zernio::InboxApi* | [**get_whats_app_media**](docs/InboxApi.md#get_whats_app_media) | **GET** /v1/whatsapp/media/{mediaId} | Download WhatsApp media
|
|
325
324
|
*Zernio::InboxAnalyticsApi* | [**get_inbox_conversation_analytics**](docs/InboxAnalyticsApi.md#get_inbox_conversation_analytics) | **GET** /v1/analytics/inbox/conversations/{conversationId} | Get conversation analytics
|
|
326
325
|
*Zernio::InboxAnalyticsApi* | [**get_inbox_heatmap**](docs/InboxAnalyticsApi.md#get_inbox_heatmap) | **GET** /v1/analytics/inbox/heatmap | Get day × hour heatmap
|
|
327
326
|
*Zernio::InboxAnalyticsApi* | [**get_inbox_response_time**](docs/InboxAnalyticsApi.md#get_inbox_response_time) | **GET** /v1/analytics/inbox/response-time | Get inbox response-time stats
|
|
@@ -488,6 +487,7 @@ Class | Method | HTTP request | Description
|
|
|
488
487
|
*Zernio::WhatsAppApi* | [**get_whats_app_dataset**](docs/WhatsAppApi.md#get_whats_app_dataset) | **GET** /v1/whatsapp/dataset | Get CTWA conversions dataset
|
|
489
488
|
*Zernio::WhatsAppApi* | [**get_whats_app_display_name**](docs/WhatsAppApi.md#get_whats_app_display_name) | **GET** /v1/whatsapp/business-profile/display-name | Get display name status
|
|
490
489
|
*Zernio::WhatsAppApi* | [**get_whats_app_group_chat**](docs/WhatsAppApi.md#get_whats_app_group_chat) | **GET** /v1/whatsapp/wa-groups/{groupId} | Get group info
|
|
490
|
+
*Zernio::WhatsAppApi* | [**get_whats_app_media**](docs/WhatsAppApi.md#get_whats_app_media) | **GET** /v1/whatsapp/media/{mediaId} | Download WhatsApp media
|
|
491
491
|
*Zernio::WhatsAppApi* | [**get_whats_app_template**](docs/WhatsAppApi.md#get_whats_app_template) | **GET** /v1/whatsapp/templates/{templateName} | Get template
|
|
492
492
|
*Zernio::WhatsAppApi* | [**get_whats_app_templates**](docs/WhatsAppApi.md#get_whats_app_templates) | **GET** /v1/whatsapp/templates | List templates
|
|
493
493
|
*Zernio::WhatsAppApi* | [**get_whatsapp_business_username**](docs/WhatsAppApi.md#get_whatsapp_business_username) | **GET** /v1/whatsapp/business-profile/username | Get business username
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| **brand_id** | **String** | TCR brand id, useful when referencing the brand in carrier support threads. | [optional] |
|
|
14
14
|
| **campaign_id** | **String** | TCR campaign id. | [optional] |
|
|
15
15
|
| **decline_reason** | **String** | | [optional] |
|
|
16
|
+
| **tf_action_required_at** | **Time** | Toll-free only: when the carrier requested changes (\"Waiting For Customer\"). The request must be resubmitted within 7 days of this timestamp or it expires. | [optional] |
|
|
16
17
|
| **phone_numbers** | **Array<String>** | | [optional] |
|
|
17
18
|
| **awaiting_otp** | **Boolean** | Sole-prop 10DLC only; the OTP step is still pending. | [optional] |
|
|
18
19
|
| **trust_score** | **Float** | Carrier-assigned brand trust score; drives throughput. | [optional] |
|
|
@@ -33,6 +34,7 @@ instance = Zernio::ListSmsRegistrations200ResponseRegistrationsInner.new(
|
|
|
33
34
|
brand_id: null,
|
|
34
35
|
campaign_id: null,
|
|
35
36
|
decline_reason: null,
|
|
37
|
+
tf_action_required_at: null,
|
|
36
38
|
phone_numbers: null,
|
|
37
39
|
awaiting_otp: null,
|
|
38
40
|
trust_score: null,
|
data/docs/WhatsAppApi.md
CHANGED
|
@@ -20,6 +20,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
20
20
|
| [**get_whats_app_dataset**](WhatsAppApi.md#get_whats_app_dataset) | **GET** /v1/whatsapp/dataset | Get CTWA conversions dataset |
|
|
21
21
|
| [**get_whats_app_display_name**](WhatsAppApi.md#get_whats_app_display_name) | **GET** /v1/whatsapp/business-profile/display-name | Get display name status |
|
|
22
22
|
| [**get_whats_app_group_chat**](WhatsAppApi.md#get_whats_app_group_chat) | **GET** /v1/whatsapp/wa-groups/{groupId} | Get group info |
|
|
23
|
+
| [**get_whats_app_media**](WhatsAppApi.md#get_whats_app_media) | **GET** /v1/whatsapp/media/{mediaId} | Download WhatsApp media |
|
|
23
24
|
| [**get_whats_app_template**](WhatsAppApi.md#get_whats_app_template) | **GET** /v1/whatsapp/templates/{templateName} | Get template |
|
|
24
25
|
| [**get_whats_app_templates**](WhatsAppApi.md#get_whats_app_templates) | **GET** /v1/whatsapp/templates | List templates |
|
|
25
26
|
| [**get_whatsapp_business_username**](WhatsAppApi.md#get_whatsapp_business_username) | **GET** /v1/whatsapp/business-profile/username | Get business username |
|
|
@@ -1167,6 +1168,77 @@ end
|
|
|
1167
1168
|
- **Accept**: application/json
|
|
1168
1169
|
|
|
1169
1170
|
|
|
1171
|
+
## get_whats_app_media
|
|
1172
|
+
|
|
1173
|
+
> File get_whats_app_media(media_id, account_id)
|
|
1174
|
+
|
|
1175
|
+
Download WhatsApp media
|
|
1176
|
+
|
|
1177
|
+
Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
1178
|
+
|
|
1179
|
+
### Examples
|
|
1180
|
+
|
|
1181
|
+
```ruby
|
|
1182
|
+
require 'time'
|
|
1183
|
+
require 'zernio-sdk'
|
|
1184
|
+
# setup authorization
|
|
1185
|
+
Zernio.configure do |config|
|
|
1186
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1187
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1188
|
+
end
|
|
1189
|
+
|
|
1190
|
+
api_instance = Zernio::WhatsAppApi.new
|
|
1191
|
+
media_id = 'media_id_example' # String | The media id from `attachments[].payload.id`.
|
|
1192
|
+
account_id = 'account_id_example' # String | The WhatsApp account that received the media.
|
|
1193
|
+
|
|
1194
|
+
begin
|
|
1195
|
+
# Download WhatsApp media
|
|
1196
|
+
result = api_instance.get_whats_app_media(media_id, account_id)
|
|
1197
|
+
p result
|
|
1198
|
+
rescue Zernio::ApiError => e
|
|
1199
|
+
puts "Error when calling WhatsAppApi->get_whats_app_media: #{e}"
|
|
1200
|
+
end
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
#### Using the get_whats_app_media_with_http_info variant
|
|
1204
|
+
|
|
1205
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1206
|
+
|
|
1207
|
+
> <Array(File, Integer, Hash)> get_whats_app_media_with_http_info(media_id, account_id)
|
|
1208
|
+
|
|
1209
|
+
```ruby
|
|
1210
|
+
begin
|
|
1211
|
+
# Download WhatsApp media
|
|
1212
|
+
data, status_code, headers = api_instance.get_whats_app_media_with_http_info(media_id, account_id)
|
|
1213
|
+
p status_code # => 2xx
|
|
1214
|
+
p headers # => { ... }
|
|
1215
|
+
p data # => File
|
|
1216
|
+
rescue Zernio::ApiError => e
|
|
1217
|
+
puts "Error when calling WhatsAppApi->get_whats_app_media_with_http_info: #{e}"
|
|
1218
|
+
end
|
|
1219
|
+
```
|
|
1220
|
+
|
|
1221
|
+
### Parameters
|
|
1222
|
+
|
|
1223
|
+
| Name | Type | Description | Notes |
|
|
1224
|
+
| ---- | ---- | ----------- | ----- |
|
|
1225
|
+
| **media_id** | **String** | The media id from `attachments[].payload.id`. | |
|
|
1226
|
+
| **account_id** | **String** | The WhatsApp account that received the media. | |
|
|
1227
|
+
|
|
1228
|
+
### Return type
|
|
1229
|
+
|
|
1230
|
+
**File**
|
|
1231
|
+
|
|
1232
|
+
### Authorization
|
|
1233
|
+
|
|
1234
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1235
|
+
|
|
1236
|
+
### HTTP request headers
|
|
1237
|
+
|
|
1238
|
+
- **Content-Type**: Not defined
|
|
1239
|
+
- **Accept**: application/octet-stream, application/json
|
|
1240
|
+
|
|
1241
|
+
|
|
1170
1242
|
## get_whats_app_template
|
|
1171
1243
|
|
|
1172
1244
|
> <GetWhatsAppTemplate200Response> get_whats_app_template(template_name, account_id)
|
|
@@ -1142,6 +1142,76 @@ module Zernio
|
|
|
1142
1142
|
return data, status_code, headers
|
|
1143
1143
|
end
|
|
1144
1144
|
|
|
1145
|
+
# Download WhatsApp media
|
|
1146
|
+
# Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
1147
|
+
# @param media_id [String] The media id from `attachments[].payload.id`.
|
|
1148
|
+
# @param account_id [String] The WhatsApp account that received the media.
|
|
1149
|
+
# @param [Hash] opts the optional parameters
|
|
1150
|
+
# @return [File]
|
|
1151
|
+
def get_whats_app_media(media_id, account_id, opts = {})
|
|
1152
|
+
data, _status_code, _headers = get_whats_app_media_with_http_info(media_id, account_id, opts)
|
|
1153
|
+
data
|
|
1154
|
+
end
|
|
1155
|
+
|
|
1156
|
+
# Download WhatsApp media
|
|
1157
|
+
# Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
1158
|
+
# @param media_id [String] The media id from `attachments[].payload.id`.
|
|
1159
|
+
# @param account_id [String] The WhatsApp account that received the media.
|
|
1160
|
+
# @param [Hash] opts the optional parameters
|
|
1161
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
1162
|
+
def get_whats_app_media_with_http_info(media_id, account_id, opts = {})
|
|
1163
|
+
if @api_client.config.debugging
|
|
1164
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_media ...'
|
|
1165
|
+
end
|
|
1166
|
+
# verify the required parameter 'media_id' is set
|
|
1167
|
+
if @api_client.config.client_side_validation && media_id.nil?
|
|
1168
|
+
fail ArgumentError, "Missing the required parameter 'media_id' when calling WhatsAppApi.get_whats_app_media"
|
|
1169
|
+
end
|
|
1170
|
+
# verify the required parameter 'account_id' is set
|
|
1171
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1172
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.get_whats_app_media"
|
|
1173
|
+
end
|
|
1174
|
+
# resource path
|
|
1175
|
+
local_var_path = '/v1/whatsapp/media/{mediaId}'.sub('{' + 'mediaId' + '}', CGI.escape(media_id.to_s))
|
|
1176
|
+
|
|
1177
|
+
# query parameters
|
|
1178
|
+
query_params = opts[:query_params] || {}
|
|
1179
|
+
query_params[:'accountId'] = account_id
|
|
1180
|
+
|
|
1181
|
+
# header parameters
|
|
1182
|
+
header_params = opts[:header_params] || {}
|
|
1183
|
+
# HTTP header 'Accept' (if needed)
|
|
1184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
|
|
1185
|
+
|
|
1186
|
+
# form parameters
|
|
1187
|
+
form_params = opts[:form_params] || {}
|
|
1188
|
+
|
|
1189
|
+
# http body (model)
|
|
1190
|
+
post_body = opts[:debug_body]
|
|
1191
|
+
|
|
1192
|
+
# return_type
|
|
1193
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
1194
|
+
|
|
1195
|
+
# auth_names
|
|
1196
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1197
|
+
|
|
1198
|
+
new_options = opts.merge(
|
|
1199
|
+
:operation => :"WhatsAppApi.get_whats_app_media",
|
|
1200
|
+
:header_params => header_params,
|
|
1201
|
+
:query_params => query_params,
|
|
1202
|
+
:form_params => form_params,
|
|
1203
|
+
:body => post_body,
|
|
1204
|
+
:auth_names => auth_names,
|
|
1205
|
+
:return_type => return_type
|
|
1206
|
+
)
|
|
1207
|
+
|
|
1208
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1209
|
+
if @api_client.config.debugging
|
|
1210
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#get_whats_app_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1211
|
+
end
|
|
1212
|
+
return data, status_code, headers
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1145
1215
|
# Get template
|
|
1146
1216
|
# Retrieve a single message template by name.
|
|
1147
1217
|
# @param template_name [String] Template name
|
|
@@ -37,6 +37,9 @@ module Zernio
|
|
|
37
37
|
|
|
38
38
|
attr_accessor :decline_reason
|
|
39
39
|
|
|
40
|
+
# Toll-free only: when the carrier requested changes (\"Waiting For Customer\"). The request must be resubmitted within 7 days of this timestamp or it expires.
|
|
41
|
+
attr_accessor :tf_action_required_at
|
|
42
|
+
|
|
40
43
|
attr_accessor :phone_numbers
|
|
41
44
|
|
|
42
45
|
# Sole-prop 10DLC only; the OTP step is still pending.
|
|
@@ -81,6 +84,7 @@ module Zernio
|
|
|
81
84
|
:'brand_id' => :'brandId',
|
|
82
85
|
:'campaign_id' => :'campaignId',
|
|
83
86
|
:'decline_reason' => :'declineReason',
|
|
87
|
+
:'tf_action_required_at' => :'tfActionRequiredAt',
|
|
84
88
|
:'phone_numbers' => :'phoneNumbers',
|
|
85
89
|
:'awaiting_otp' => :'awaitingOtp',
|
|
86
90
|
:'trust_score' => :'trustScore',
|
|
@@ -110,6 +114,7 @@ module Zernio
|
|
|
110
114
|
:'brand_id' => :'String',
|
|
111
115
|
:'campaign_id' => :'String',
|
|
112
116
|
:'decline_reason' => :'String',
|
|
117
|
+
:'tf_action_required_at' => :'Time',
|
|
113
118
|
:'phone_numbers' => :'Array<String>',
|
|
114
119
|
:'awaiting_otp' => :'Boolean',
|
|
115
120
|
:'trust_score' => :'Float',
|
|
@@ -124,6 +129,7 @@ module Zernio
|
|
|
124
129
|
:'brand_id',
|
|
125
130
|
:'campaign_id',
|
|
126
131
|
:'decline_reason',
|
|
132
|
+
:'tf_action_required_at',
|
|
127
133
|
:'trust_score',
|
|
128
134
|
])
|
|
129
135
|
end
|
|
@@ -180,6 +186,10 @@ module Zernio
|
|
|
180
186
|
self.decline_reason = attributes[:'decline_reason']
|
|
181
187
|
end
|
|
182
188
|
|
|
189
|
+
if attributes.key?(:'tf_action_required_at')
|
|
190
|
+
self.tf_action_required_at = attributes[:'tf_action_required_at']
|
|
191
|
+
end
|
|
192
|
+
|
|
183
193
|
if attributes.key?(:'phone_numbers')
|
|
184
194
|
if (value = attributes[:'phone_numbers']).is_a?(Array)
|
|
185
195
|
self.phone_numbers = value
|
|
@@ -252,6 +262,7 @@ module Zernio
|
|
|
252
262
|
brand_id == o.brand_id &&
|
|
253
263
|
campaign_id == o.campaign_id &&
|
|
254
264
|
decline_reason == o.decline_reason &&
|
|
265
|
+
tf_action_required_at == o.tf_action_required_at &&
|
|
255
266
|
phone_numbers == o.phone_numbers &&
|
|
256
267
|
awaiting_otp == o.awaiting_otp &&
|
|
257
268
|
trust_score == o.trust_score &&
|
|
@@ -267,7 +278,7 @@ module Zernio
|
|
|
267
278
|
# Calculates hash code according to all attributes.
|
|
268
279
|
# @return [Integer] Hash code
|
|
269
280
|
def hash
|
|
270
|
-
[id, registration_type, display_name, status, brand_status, campaign_status, brand_id, campaign_id, decline_reason, phone_numbers, awaiting_otp, trust_score, throughput].hash
|
|
281
|
+
[id, registration_type, display_name, status, brand_status, campaign_status, brand_id, campaign_id, decline_reason, tf_action_required_at, phone_numbers, awaiting_otp, trust_score, throughput].hash
|
|
271
282
|
end
|
|
272
283
|
|
|
273
284
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1494,7 +1494,6 @@ require 'zernio-sdk/api/gmb_place_actions_api'
|
|
|
1494
1494
|
require 'zernio-sdk/api/gmb_reviews_api'
|
|
1495
1495
|
require 'zernio-sdk/api/gmb_services_api'
|
|
1496
1496
|
require 'zernio-sdk/api/gmb_verifications_api'
|
|
1497
|
-
require 'zernio-sdk/api/inbox_api'
|
|
1498
1497
|
require 'zernio-sdk/api/inbox_analytics_api'
|
|
1499
1498
|
require 'zernio-sdk/api/instagram_api'
|
|
1500
1499
|
require 'zernio-sdk/api/invites_api'
|
data/openapi.yaml
CHANGED
|
@@ -492,6 +492,22 @@ components:
|
|
|
492
492
|
error:
|
|
493
493
|
type: string
|
|
494
494
|
example: Not found
|
|
495
|
+
RateLimited:
|
|
496
|
+
description: |
|
|
497
|
+
The connected account's upstream platform quota is exhausted.
|
|
498
|
+
|
|
499
|
+
Reddit rate-limits per connected Reddit user (1000 requests per
|
|
500
|
+
10-minute window), and that budget is shared by every operation using
|
|
501
|
+
that account. Retry after the window resets rather than retrying
|
|
502
|
+
immediately; repeated calls while exhausted do not succeed and keep the
|
|
503
|
+
budget spent.
|
|
504
|
+
headers:
|
|
505
|
+
Retry-After:
|
|
506
|
+
description: 'Seconds remaining until the upstream quota resets.'
|
|
507
|
+
schema: { type: integer }
|
|
508
|
+
content:
|
|
509
|
+
application/json:
|
|
510
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
495
511
|
PaymentRequired:
|
|
496
512
|
description: |
|
|
497
513
|
Payment method or enterprise contract required. The authenticated
|
|
@@ -11276,9 +11292,18 @@ paths:
|
|
|
11276
11292
|
isGallery: false
|
|
11277
11293
|
after: "t3_1abc234"
|
|
11278
11294
|
before: null
|
|
11279
|
-
'400': {
|
|
11295
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
11280
11296
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
11281
|
-
'404':
|
|
11297
|
+
'404':
|
|
11298
|
+
description: |
|
|
11299
|
+
No active Reddit account with this ID is available to the API key.
|
|
11300
|
+
It may have been disconnected or deleted, or it belongs to a profile
|
|
11301
|
+
the key cannot access. Re-connecting an account issues a NEW account
|
|
11302
|
+
ID, so an ID stored from before a reconnect will not resolve.
|
|
11303
|
+
content:
|
|
11304
|
+
application/json:
|
|
11305
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
11306
|
+
'429': { $ref: '#/components/responses/RateLimited' }
|
|
11282
11307
|
/v1/reddit/feed:
|
|
11283
11308
|
get:
|
|
11284
11309
|
operationId: getRedditFeed
|
|
@@ -11354,9 +11379,18 @@ paths:
|
|
|
11354
11379
|
- "https://i.redd.it/def456.jpg"
|
|
11355
11380
|
after: "t3_1def456"
|
|
11356
11381
|
before: null
|
|
11357
|
-
'400': {
|
|
11382
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
11358
11383
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
11359
|
-
'404':
|
|
11384
|
+
'404':
|
|
11385
|
+
description: |
|
|
11386
|
+
No active Reddit account with this ID is available to the API key.
|
|
11387
|
+
It may have been disconnected or deleted, or it belongs to a profile
|
|
11388
|
+
the key cannot access. Re-connecting an account issues a NEW account
|
|
11389
|
+
ID, so an ID stored from before a reconnect will not resolve.
|
|
11390
|
+
content:
|
|
11391
|
+
application/json:
|
|
11392
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
11393
|
+
'429': { $ref: '#/components/responses/RateLimited' }
|
|
11360
11394
|
/v1/billing:
|
|
11361
11395
|
get:
|
|
11362
11396
|
operationId: getBilling
|
|
@@ -22593,7 +22627,7 @@ paths:
|
|
|
22593
22627
|
/v1/whatsapp/media/{mediaId}:
|
|
22594
22628
|
get:
|
|
22595
22629
|
operationId: getWhatsAppMedia
|
|
22596
|
-
tags: [
|
|
22630
|
+
tags: [WhatsApp]
|
|
22597
22631
|
summary: Download WhatsApp media
|
|
22598
22632
|
description: |
|
|
22599
22633
|
Streams the binary for a WhatsApp attachment. This is the endpoint the
|
|
@@ -26101,6 +26135,7 @@ paths:
|
|
|
26101
26135
|
brandId: { type: [string, "null"], description: "TCR brand id, useful when referencing the brand in carrier support threads." }
|
|
26102
26136
|
campaignId: { type: [string, "null"], description: TCR campaign id. }
|
|
26103
26137
|
declineReason: { type: [string, "null"] }
|
|
26138
|
+
tfActionRequiredAt: { type: [string, "null"], format: date-time, description: 'Toll-free only: when the carrier requested changes ("Waiting For Customer"). The request must be resubmitted within 7 days of this timestamp or it expires.' }
|
|
26104
26139
|
phoneNumbers: { type: array, items: { type: string } }
|
|
26105
26140
|
awaitingOtp: { type: boolean, description: Sole-prop 10DLC only; the OTP step is still pending. }
|
|
26106
26141
|
trustScore: { type: [number, "null"], description: Carrier-assigned brand trust score; drives throughput. }
|
|
@@ -235,6 +235,19 @@ describe 'WhatsAppApi' do
|
|
|
235
235
|
end
|
|
236
236
|
end
|
|
237
237
|
|
|
238
|
+
# unit tests for get_whats_app_media
|
|
239
|
+
# Download WhatsApp media
|
|
240
|
+
# Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
241
|
+
# @param media_id The media id from `attachments[].payload.id`.
|
|
242
|
+
# @param account_id The WhatsApp account that received the media.
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [File]
|
|
245
|
+
describe 'get_whats_app_media test' do
|
|
246
|
+
it 'should work' do
|
|
247
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
238
251
|
# unit tests for get_whats_app_template
|
|
239
252
|
# Get template
|
|
240
253
|
# Retrieve a single message template by name.
|
|
@@ -89,6 +89,12 @@ describe Zernio::ListSmsRegistrations200ResponseRegistrationsInner do
|
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
describe 'test attribute "tf_action_required_at"' do
|
|
93
|
+
it 'should work' do
|
|
94
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
92
98
|
describe 'test attribute "phone_numbers"' do
|
|
93
99
|
it 'should work' do
|
|
94
100
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.544
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -775,7 +775,6 @@ files:
|
|
|
775
775
|
- docs/HideInboxComment200Response.md
|
|
776
776
|
- docs/HideInboxCommentRequest.md
|
|
777
777
|
- docs/InboxAnalyticsApi.md
|
|
778
|
-
- docs/InboxApi.md
|
|
779
778
|
- docs/InboxMessageEditAttachment.md
|
|
780
779
|
- docs/InboxMessageEditHistoryEntry.md
|
|
781
780
|
- docs/InboxWebhookAccount.md
|
|
@@ -1598,7 +1597,6 @@ files:
|
|
|
1598
1597
|
- lib/zernio-sdk/api/gmb_services_api.rb
|
|
1599
1598
|
- lib/zernio-sdk/api/gmb_verifications_api.rb
|
|
1600
1599
|
- lib/zernio-sdk/api/inbox_analytics_api.rb
|
|
1601
|
-
- lib/zernio-sdk/api/inbox_api.rb
|
|
1602
1600
|
- lib/zernio-sdk/api/instagram_api.rb
|
|
1603
1601
|
- lib/zernio-sdk/api/invites_api.rb
|
|
1604
1602
|
- lib/zernio-sdk/api/linked_in_mentions_api.rb
|
|
@@ -3112,7 +3110,6 @@ files:
|
|
|
3112
3110
|
- spec/api/gmb_services_api_spec.rb
|
|
3113
3111
|
- spec/api/gmb_verifications_api_spec.rb
|
|
3114
3112
|
- spec/api/inbox_analytics_api_spec.rb
|
|
3115
|
-
- spec/api/inbox_api_spec.rb
|
|
3116
3113
|
- spec/api/instagram_api_spec.rb
|
|
3117
3114
|
- spec/api/invites_api_spec.rb
|
|
3118
3115
|
- spec/api/linked_in_mentions_api_spec.rb
|
|
@@ -4649,7 +4646,6 @@ test_files:
|
|
|
4649
4646
|
- spec/api/comment_automations_api_spec.rb
|
|
4650
4647
|
- spec/api/webhooks_api_spec.rb
|
|
4651
4648
|
- spec/api/voice_api_spec.rb
|
|
4652
|
-
- spec/api/inbox_api_spec.rb
|
|
4653
4649
|
- spec/api/ads_api_spec.rb
|
|
4654
4650
|
- spec/api/verify_api_spec.rb
|
|
4655
4651
|
- spec/api/broadcasts_api_spec.rb
|
data/docs/InboxApi.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Zernio::InboxApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://zernio.com/api*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**get_whats_app_media**](InboxApi.md#get_whats_app_media) | **GET** /v1/whatsapp/media/{mediaId} | Download WhatsApp media |
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## get_whats_app_media
|
|
11
|
-
|
|
12
|
-
> File get_whats_app_media(media_id, account_id)
|
|
13
|
-
|
|
14
|
-
Download WhatsApp media
|
|
15
|
-
|
|
16
|
-
Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
17
|
-
|
|
18
|
-
### Examples
|
|
19
|
-
|
|
20
|
-
```ruby
|
|
21
|
-
require 'time'
|
|
22
|
-
require 'zernio-sdk'
|
|
23
|
-
# setup authorization
|
|
24
|
-
Zernio.configure do |config|
|
|
25
|
-
# Configure Bearer authorization (JWT): bearerAuth
|
|
26
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
api_instance = Zernio::InboxApi.new
|
|
30
|
-
media_id = 'media_id_example' # String | The media id from `attachments[].payload.id`.
|
|
31
|
-
account_id = 'account_id_example' # String | The WhatsApp account that received the media.
|
|
32
|
-
|
|
33
|
-
begin
|
|
34
|
-
# Download WhatsApp media
|
|
35
|
-
result = api_instance.get_whats_app_media(media_id, account_id)
|
|
36
|
-
p result
|
|
37
|
-
rescue Zernio::ApiError => e
|
|
38
|
-
puts "Error when calling InboxApi->get_whats_app_media: #{e}"
|
|
39
|
-
end
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
#### Using the get_whats_app_media_with_http_info variant
|
|
43
|
-
|
|
44
|
-
This returns an Array which contains the response data, status code and headers.
|
|
45
|
-
|
|
46
|
-
> <Array(File, Integer, Hash)> get_whats_app_media_with_http_info(media_id, account_id)
|
|
47
|
-
|
|
48
|
-
```ruby
|
|
49
|
-
begin
|
|
50
|
-
# Download WhatsApp media
|
|
51
|
-
data, status_code, headers = api_instance.get_whats_app_media_with_http_info(media_id, account_id)
|
|
52
|
-
p status_code # => 2xx
|
|
53
|
-
p headers # => { ... }
|
|
54
|
-
p data # => File
|
|
55
|
-
rescue Zernio::ApiError => e
|
|
56
|
-
puts "Error when calling InboxApi->get_whats_app_media_with_http_info: #{e}"
|
|
57
|
-
end
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Parameters
|
|
61
|
-
|
|
62
|
-
| Name | Type | Description | Notes |
|
|
63
|
-
| ---- | ---- | ----------- | ----- |
|
|
64
|
-
| **media_id** | **String** | The media id from `attachments[].payload.id`. | |
|
|
65
|
-
| **account_id** | **String** | The WhatsApp account that received the media. | |
|
|
66
|
-
|
|
67
|
-
### Return type
|
|
68
|
-
|
|
69
|
-
**File**
|
|
70
|
-
|
|
71
|
-
### Authorization
|
|
72
|
-
|
|
73
|
-
[bearerAuth](../README.md#bearerAuth)
|
|
74
|
-
|
|
75
|
-
### HTTP request headers
|
|
76
|
-
|
|
77
|
-
- **Content-Type**: Not defined
|
|
78
|
-
- **Accept**: application/octet-stream, application/json
|
|
79
|
-
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Zernio API
|
|
3
|
-
|
|
4
|
-
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.4
|
|
7
|
-
Contact: support@zernio.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.19.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'cgi'
|
|
14
|
-
|
|
15
|
-
module Zernio
|
|
16
|
-
class InboxApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Download WhatsApp media
|
|
23
|
-
# Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
24
|
-
# @param media_id [String] The media id from `attachments[].payload.id`.
|
|
25
|
-
# @param account_id [String] The WhatsApp account that received the media.
|
|
26
|
-
# @param [Hash] opts the optional parameters
|
|
27
|
-
# @return [File]
|
|
28
|
-
def get_whats_app_media(media_id, account_id, opts = {})
|
|
29
|
-
data, _status_code, _headers = get_whats_app_media_with_http_info(media_id, account_id, opts)
|
|
30
|
-
data
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Download WhatsApp media
|
|
34
|
-
# Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
35
|
-
# @param media_id [String] The media id from `attachments[].payload.id`.
|
|
36
|
-
# @param account_id [String] The WhatsApp account that received the media.
|
|
37
|
-
# @param [Hash] opts the optional parameters
|
|
38
|
-
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
39
|
-
def get_whats_app_media_with_http_info(media_id, account_id, opts = {})
|
|
40
|
-
if @api_client.config.debugging
|
|
41
|
-
@api_client.config.logger.debug 'Calling API: InboxApi.get_whats_app_media ...'
|
|
42
|
-
end
|
|
43
|
-
# verify the required parameter 'media_id' is set
|
|
44
|
-
if @api_client.config.client_side_validation && media_id.nil?
|
|
45
|
-
fail ArgumentError, "Missing the required parameter 'media_id' when calling InboxApi.get_whats_app_media"
|
|
46
|
-
end
|
|
47
|
-
# verify the required parameter 'account_id' is set
|
|
48
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
49
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling InboxApi.get_whats_app_media"
|
|
50
|
-
end
|
|
51
|
-
# resource path
|
|
52
|
-
local_var_path = '/v1/whatsapp/media/{mediaId}'.sub('{' + 'mediaId' + '}', CGI.escape(media_id.to_s))
|
|
53
|
-
|
|
54
|
-
# query parameters
|
|
55
|
-
query_params = opts[:query_params] || {}
|
|
56
|
-
query_params[:'accountId'] = account_id
|
|
57
|
-
|
|
58
|
-
# header parameters
|
|
59
|
-
header_params = opts[:header_params] || {}
|
|
60
|
-
# HTTP header 'Accept' (if needed)
|
|
61
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
|
|
62
|
-
|
|
63
|
-
# form parameters
|
|
64
|
-
form_params = opts[:form_params] || {}
|
|
65
|
-
|
|
66
|
-
# http body (model)
|
|
67
|
-
post_body = opts[:debug_body]
|
|
68
|
-
|
|
69
|
-
# return_type
|
|
70
|
-
return_type = opts[:debug_return_type] || 'File'
|
|
71
|
-
|
|
72
|
-
# auth_names
|
|
73
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
74
|
-
|
|
75
|
-
new_options = opts.merge(
|
|
76
|
-
:operation => :"InboxApi.get_whats_app_media",
|
|
77
|
-
:header_params => header_params,
|
|
78
|
-
:query_params => query_params,
|
|
79
|
-
:form_params => form_params,
|
|
80
|
-
:body => post_body,
|
|
81
|
-
:auth_names => auth_names,
|
|
82
|
-
:return_type => return_type
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
86
|
-
if @api_client.config.debugging
|
|
87
|
-
@api_client.config.logger.debug "API called: InboxApi#get_whats_app_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
|
-
end
|
|
89
|
-
return data, status_code, headers
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
end
|
data/spec/api/inbox_api_spec.rb
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Zernio API
|
|
3
|
-
|
|
4
|
-
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.4
|
|
7
|
-
Contact: support@zernio.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.19.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'spec_helper'
|
|
14
|
-
require 'json'
|
|
15
|
-
|
|
16
|
-
# Unit tests for Zernio::InboxApi
|
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
-
# Please update as you see appropriate
|
|
19
|
-
describe 'InboxApi' do
|
|
20
|
-
before do
|
|
21
|
-
# run before each test
|
|
22
|
-
@api_instance = Zernio::InboxApi.new
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
after do
|
|
26
|
-
# run after each test
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
describe 'test an instance of InboxApi' do
|
|
30
|
-
it 'should create an instance of InboxApi' do
|
|
31
|
-
expect(@api_instance).to be_instance_of(Zernio::InboxApi)
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# unit tests for get_whats_app_media
|
|
36
|
-
# Download WhatsApp media
|
|
37
|
-
# Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
38
|
-
# @param media_id The media id from `attachments[].payload.id`.
|
|
39
|
-
# @param account_id The WhatsApp account that received the media.
|
|
40
|
-
# @param [Hash] opts the optional parameters
|
|
41
|
-
# @return [File]
|
|
42
|
-
describe 'get_whats_app_media test' 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
|
-
|
|
48
|
-
end
|