late-sdk 0.0.876 → 0.0.878

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d87ea452cf5de45c224871430a0f8459b6cd798a56eef3d8910746dda7d05f80
4
- data.tar.gz: 6d7bf7c62a598ee952143c0c02c810331c7f829f7866bf57382c2a0d1f05f183
3
+ metadata.gz: 77be2cc65ee808e842f9ab2f538ca8120875292df722e6ec265763e7868f1e7e
4
+ data.tar.gz: 03f9398f2f8fce565c69fb9e5d0c347a71d489ce17963dea4ed5671366a48336
5
5
  SHA512:
6
- metadata.gz: 549892f0789b16094bae0d840cb0a7425803753b67f97e547a6bdce84d6cab6ff57e1bf5db4419ddc0f21d54a0f500d42b87bbf1ec534ed4018c4d96637db7f8
7
- data.tar.gz: 69dbd2dca53da1a574a195d52eb9d6f60f849942118e8a4c00284b7280d4e62017fbd9b3c52355957e96e0368d9e97489dd478d49527022f2d2ce6177bd9c7cf
6
+ metadata.gz: f05d61366f9bbfcbee6a3fcfc1d25885f1c7362183d05bd68e619d324ea56c5f7ad044ae216e03b20ce1aa2f9ba3df00e206f65bcc36217536e15f379633f051
7
+ data.tar.gz: d43bcf6b74c26b612982f1f334a04254a444837fb0749c3eb80ec19fc3a31003fea2bd738a55ea33b0eeb3e29e07514ed551ee6390d5f23dfdf9026f659bd30b
data/README.md CHANGED
@@ -351,6 +351,7 @@ Class | Method | HTTP request | Description
351
351
  *Zernio::ConnectApi* | [**get_shopify_connect_url**](docs/ConnectApi.md#get_shopify_connect_url) | **GET** /v1/connect/shopify | Get Shopify OAuth connect URL
352
352
  *Zernio::ConnectApi* | [**get_subreddit_rules**](docs/ConnectApi.md#get_subreddit_rules) | **GET** /v1/accounts/{accountId}/reddit-subreddits/{subreddit}/rules | Get subreddit rules
353
353
  *Zernio::ConnectApi* | [**get_telegram_connect_status**](docs/ConnectApi.md#get_telegram_connect_status) | **GET** /v1/connect/telegram | Generate Telegram code
354
+ *Zernio::ConnectApi* | [**get_whats_app_sdk_config**](docs/ConnectApi.md#get_whats_app_sdk_config) | **GET** /v1/connect/whatsapp/sdk-config | Get Embedded Signup SDK config
354
355
  *Zernio::ConnectApi* | [**get_youtube_captions**](docs/ConnectApi.md#get_youtube_captions) | **GET** /v1/accounts/{accountId}/youtube-captions | Get a YouTube video transcript
355
356
  *Zernio::ConnectApi* | [**get_youtube_playlists**](docs/ConnectApi.md#get_youtube_playlists) | **GET** /v1/accounts/{accountId}/youtube-playlists | List YouTube playlists
356
357
  *Zernio::ConnectApi* | [**handle_o_auth_callback**](docs/ConnectApi.md#handle_o_auth_callback) | **POST** /v1/connect/{platform} | Complete OAuth callback
@@ -970,6 +971,8 @@ Class | Method | HTTP request | Description
970
971
  - [Zernio::ConnectWhatsAppCredentials200Response](docs/ConnectWhatsAppCredentials200Response.md)
971
972
  - [Zernio::ConnectWhatsAppCredentials200ResponseAccount](docs/ConnectWhatsAppCredentials200ResponseAccount.md)
972
973
  - [Zernio::ConnectWhatsAppCredentialsRequest](docs/ConnectWhatsAppCredentialsRequest.md)
974
+ - [Zernio::ConnectWhatsAppEmbeddedSignup200Response](docs/ConnectWhatsAppEmbeddedSignup200Response.md)
975
+ - [Zernio::ConnectWhatsAppEmbeddedSignup200ResponseAccount](docs/ConnectWhatsAppEmbeddedSignup200ResponseAccount.md)
973
976
  - [Zernio::ConnectWhatsAppEmbeddedSignupRequest](docs/ConnectWhatsAppEmbeddedSignupRequest.md)
974
977
  - [Zernio::Connected](docs/Connected.md)
975
978
  - [Zernio::ConnectedAccount](docs/ConnectedAccount.md)
@@ -1607,6 +1610,8 @@ Class | Method | HTTP request | Description
1607
1610
  - [Zernio::GetWhatsAppNumberKycForm200Response](docs/GetWhatsAppNumberKycForm200Response.md)
1608
1611
  - [Zernio::GetWhatsAppNumberKycForm200ResponseFieldsInner](docs/GetWhatsAppNumberKycForm200ResponseFieldsInner.md)
1609
1612
  - [Zernio::GetWhatsAppNumberRemediation200Response](docs/GetWhatsAppNumberRemediation200Response.md)
1613
+ - [Zernio::GetWhatsAppSdkConfig200Response](docs/GetWhatsAppSdkConfig200Response.md)
1614
+ - [Zernio::GetWhatsAppSdkConfig200ResponseBranding](docs/GetWhatsAppSdkConfig200ResponseBranding.md)
1610
1615
  - [Zernio::GetWhatsAppTemplate200Response](docs/GetWhatsAppTemplate200Response.md)
1611
1616
  - [Zernio::GetWhatsAppTemplate200ResponseTemplate](docs/GetWhatsAppTemplate200ResponseTemplate.md)
1612
1617
  - [Zernio::GetWhatsAppTemplate409Response](docs/GetWhatsAppTemplate409Response.md)
data/docs/ConnectApi.md CHANGED
@@ -28,6 +28,7 @@ All URIs are relative to *https://zernio.com/api*
28
28
  | [**get_shopify_connect_url**](ConnectApi.md#get_shopify_connect_url) | **GET** /v1/connect/shopify | Get Shopify OAuth connect URL |
29
29
  | [**get_subreddit_rules**](ConnectApi.md#get_subreddit_rules) | **GET** /v1/accounts/{accountId}/reddit-subreddits/{subreddit}/rules | Get subreddit rules |
30
30
  | [**get_telegram_connect_status**](ConnectApi.md#get_telegram_connect_status) | **GET** /v1/connect/telegram | Generate Telegram code |
31
+ | [**get_whats_app_sdk_config**](ConnectApi.md#get_whats_app_sdk_config) | **GET** /v1/connect/whatsapp/sdk-config | Get Embedded Signup SDK config |
31
32
  | [**get_youtube_captions**](ConnectApi.md#get_youtube_captions) | **GET** /v1/accounts/{accountId}/youtube-captions | Get a YouTube video transcript |
32
33
  | [**get_youtube_playlists**](ConnectApi.md#get_youtube_playlists) | **GET** /v1/accounts/{accountId}/youtube-playlists | List YouTube playlists |
33
34
  | [**handle_o_auth_callback**](ConnectApi.md#handle_o_auth_callback) | **POST** /v1/connect/{platform} | Complete OAuth callback |
@@ -837,11 +838,11 @@ end
837
838
 
838
839
  ## connect_whats_app_embedded_signup
839
840
 
840
- > connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request)
841
+ > <ConnectWhatsAppEmbeddedSignup200Response> connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request, opts)
841
842
 
842
843
  Connect WhatsApp from Embedded Signup
843
844
 
844
- Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
845
+ Exchange the authorization code Meta's Embedded Signup popup returned. This is the call the Zernio-hosted signup page makes after the popup closes (`GET /v1/connect/whatsapp?signup=hosted`), sending the `wabaId` and `phoneNumberId` Meta reported so exactly the chosen number is connected; when both are omitted the first number the token can see is used. The code never passes through a `redirect_uri`, so `POST /v1/connect/{platform}` cannot accept it. Authenticates with an API key, or with the connect token the hosted flow issues (`X-Connect-Token` header).
845
846
 
846
847
  ### Examples
847
848
 
@@ -856,10 +857,14 @@ end
856
857
 
857
858
  api_instance = Zernio::ConnectApi.new
858
859
  connect_whats_app_embedded_signup_request = Zernio::ConnectWhatsAppEmbeddedSignupRequest.new({code: 'code_example', profile_id: 'profile_id_example'}) # ConnectWhatsAppEmbeddedSignupRequest |
860
+ opts = {
861
+ x_connect_token: 'x_connect_token_example' # String | Connect token issued by the hosted signup flow, accepted instead of an API key.
862
+ }
859
863
 
860
864
  begin
861
865
  # Connect WhatsApp from Embedded Signup
862
- api_instance.connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request)
866
+ result = api_instance.connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request, opts)
867
+ p result
863
868
  rescue Zernio::ApiError => e
864
869
  puts "Error when calling ConnectApi->connect_whats_app_embedded_signup: #{e}"
865
870
  end
@@ -867,17 +872,17 @@ end
867
872
 
868
873
  #### Using the connect_whats_app_embedded_signup_with_http_info variant
869
874
 
870
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
875
+ This returns an Array which contains the response data, status code and headers.
871
876
 
872
- > <Array(nil, Integer, Hash)> connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request)
877
+ > <Array(<ConnectWhatsAppEmbeddedSignup200Response>, Integer, Hash)> connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts)
873
878
 
874
879
  ```ruby
875
880
  begin
876
881
  # Connect WhatsApp from Embedded Signup
877
- data, status_code, headers = api_instance.connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request)
882
+ data, status_code, headers = api_instance.connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts)
878
883
  p status_code # => 2xx
879
884
  p headers # => { ... }
880
- p data # => nil
885
+ p data # => <ConnectWhatsAppEmbeddedSignup200Response>
881
886
  rescue Zernio::ApiError => e
882
887
  puts "Error when calling ConnectApi->connect_whats_app_embedded_signup_with_http_info: #{e}"
883
888
  end
@@ -888,10 +893,11 @@ end
888
893
  | Name | Type | Description | Notes |
889
894
  | ---- | ---- | ----------- | ----- |
890
895
  | **connect_whats_app_embedded_signup_request** | [**ConnectWhatsAppEmbeddedSignupRequest**](ConnectWhatsAppEmbeddedSignupRequest.md) | | |
896
+ | **x_connect_token** | **String** | Connect token issued by the hosted signup flow, accepted instead of an API key. | [optional] |
891
897
 
892
898
  ### Return type
893
899
 
894
- nil (empty response body)
900
+ [**ConnectWhatsAppEmbeddedSignup200Response**](ConnectWhatsAppEmbeddedSignup200Response.md)
895
901
 
896
902
  ### Authorization
897
903
 
@@ -1000,7 +1006,11 @@ opts = {
1000
1006
  redirect_url: 'redirect_url_example', # String | Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId. On failure, the browser is sent to the same redirect_url with `error` and `platform` appended. `error` and `platform` are always present. `error_message`, `is_user_fixable`, `reason` and `dashboard_url` are conditional and must be treated as optional. This list is NOT exhaustive and new values may be added at any time. Treat an unrecognized value as a generic failure rather than matching it exhaustively. Existing values are not renamed or removed without notice. OAuth and callback: oauth_denied, invalid_callback, invalid_state, unsupported_platform, connection_failed, internal_error, token_exchange_failed, byok_config_error, personal_account_not_supported, missing_google_permissions, platform_requires_destination, reconnect_account_mismatch, invalid_request Access and limits: profile_not_found, invalid_profile_id, access_denied, account_limit_exceeded, profile_limit_exceeded, payment_required Destination selection: no_facebook_pages, facebook_pages_error, no_google_locations, google_locations_error, google_permission_denied, no_snapchat_public_profiles, snapchat_profiles_error, discord_no_guild, slack_no_team WhatsApp: whatsapp_error, one_whatsapp_per_profile, whatsapp_number_already_connected, whatsapp_number_pinned_to_profile, connection_cancelled Google Ads (platform=googleads): google_ads_auth_failed, google_ads_invalid_state, google_ads_config_error, google_ads_token_failed, google_ads_quota_exhausted, google_ads_callback_error TikTok Ads (platform=tiktokads): tiktok_ads_auth_failed, tiktok_ads_invalid_state, tiktok_ads_access_denied, tiktok_ads_config_error, tiktok_ads_token_failed, tiktok_ads_account_not_found, tiktok_ads_callback_error X Ads (platform=xads): x_ads_denied, x_ads_auth_failed, x_ads_config_error, x_ads_account_not_found, x_ads_state_error, x_ads_token_failed, x_ads_token_missing, x_ads_callback_error Shopify (platform=shopify): shopify_auth_failed, shopify_config_error, shopify_invalid_state, shopify_invalid_hmac, shopify_invalid_shop, shopify_missing_scopes, shopify_callback_error 1. On this endpoint every upstream OAuth error is collapsed into `oauth_denied`. The provider's own value (for example Meta's `access_denied`) is not forwarded. The dedicated ads flows below are different: they use their own denial slugs and `google_ads_auth_failed` and `tiktok_ads_auth_failed` may carry the provider's raw error string in `error_message`. 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value used in the request path. The googleads and shopify flows report `googleads` and `shopify`.
1001
1007
  headless: true, # Boolean | When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience.
1002
1008
  login_method: 'instagram_login', # String | Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. `instagram_login` (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. `facebook_login`: the Facebook Login dialog, i.e. \"Instagram API with Facebook Login\". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`. `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account` and `connect_token`, which you pass into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly.
1003
- onboarding: 'api' # String | WhatsApp only. Ignored for every other platform. Controls which screen Meta's Embedded Signup popup shows. If omitted, the connection defaults to coexistence (same as `business_app` below), preserving existing behavior for numbers already on the WhatsApp Business app. `api`: standard Embedded Signup, showing Meta's WABA/number picker. Use this to connect a phone number already on Cloud API elsewhere. `business_app`: coexistence, i.e. 'Connect existing WhatsApp Business app' (a number shared between Cloud API and the consumer WhatsApp Business app).
1009
+ onboarding: 'api', # String | WhatsApp only. Ignored for every other platform. Controls which screen Meta's Embedded Signup popup shows. If omitted, the connection defaults to coexistence (same as `business_app` below), preserving existing behavior for numbers already on the WhatsApp Business app. `api`: standard Embedded Signup, showing Meta's WABA/number picker. Use this to connect a phone number already on Cloud API elsewhere. `business_app`: coexistence, i.e. 'Connect existing WhatsApp Business app' (a number shared between Cloud API and the consumer WhatsApp Business app).
1010
+ signup: 'hosted', # String | WhatsApp only. Rejected with 400 `INVALID_FIELD_VALUE` on any other platform. `hosted`: `authUrl` points at a Zernio-hosted page on zernio.com instead of Meta's OAuth dialog, and the response carries `authUrl` only (no `state`). That page opens Meta's Embedded Signup popup itself, so it learns which WhatsApp Business Account and number the user picked inside the popup and connects exactly that one. Use it when your users' Facebook logins manage several WhatsApp accounts: on the default redirect flow Meta only returns an authorization code, so when that login can see more than one number the user lands on Zernio's number picker and has to choose again. Nothing to embed on your side and no domain setup: send the user to `authUrl`, and they come back to `redirect_url` with the same params as the redirect flow. Success: `connected=whatsapp`, `profileId`, `accountId`, `username` (plus `connect_token` for API-key callers). Failure: `error` and `platform=whatsapp`, with the same values and extras as the redirect flow (`one_whatsapp_per_profile`, `whatsapp_number_already_connected` and `whatsapp_number_pinned_to_profile` with `is_user_fixable=true`; `payment_required` with `reason` and `dashboard_url`; `whatsapp_error` with `error_message` when Meta reported one), plus two of its own: `connection_cancelled` when the popup was closed before finishing (`error_message` carries Meta's last reported step or error when there is one) and `session_expired` when the user took longer than the 60 minute window the hosted page is valid for; restart the flow with a new call in that case. `onboarding` is carried through and a pre-verified Zernio-provisioned number is attached like on the redirect flow. `headless` has no effect here because there is no selection step left to hand you. When a previously disconnected account for this profile can simply be re-enabled, this endpoint re-enables it and returns the account directly instead of a URL, exactly like the redirect flow. The page shows the same guidance as the Zernio dashboard: a pre-verified Zernio-provisioned number is called out by name (\"choose it in Meta's list, no code will be asked\"), coexistence and standard signups get their explainer video, and a step-by-step follow-along checklist stays visible while Meta's popup is open. Skin it with `brandName`, `primaryColor` and `language` below.
1011
+ brand_name: 'brand_name_example', # String | Hosted signup page only (`signup=hosted`, WhatsApp): name shown in the page title (\"Connect your WhatsApp number to <brandName>\") instead of Zernio. The Zernio logo stays: the page is co-branded, not white-label. Trimmed; 1 to 60 characters. Rejected with 400 `INVALID_FIELD_VALUE` without `signup=hosted`. Stored on the signup session at issue time, so the page URL cannot change it.
1012
+ primary_color: 'primary_color_example', # String | Hosted signup page only (`signup=hosted`, WhatsApp): hex colour (`#RRGGBB`) for the primary button and step accents. Validated server-side; anything else is a 400 `INVALID_FIELD_VALUE`. Rejected without `signup=hosted`.
1013
+ language: 'en' # String | Hosted signup page only (`signup=hosted`, WhatsApp): language of the page and its follow-along guide. Explainer videos stay in English. Default `en`. Rejected without `signup=hosted`.
1004
1014
  }
1005
1015
 
1006
1016
  begin
@@ -1040,6 +1050,10 @@ end
1040
1050
  | **headless** | **Boolean** | When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio&#39;s default account selection UI. Use this to build a custom connect experience. | [optional][default to false] |
1041
1051
  | **login_method** | **String** | Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. &#x60;instagram_login&#x60; (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. &#x60;facebook_login&#x60;: the Facebook Login dialog, i.e. \&quot;Instagram API with Facebook Login\&quot;. The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, &#x60;/v1/connect/instagram/select-account&#x60;. &#x60;facebook_login&#x60; supports &#x60;headless&#x3D;true&#x60; like the other selection platforms: the callback redirects to your &#x60;redirect_url&#x60; with &#x60;profileId&#x60;, &#x60;tempToken&#x60;, &#x60;platform&#x3D;instagram&#x60;, &#x60;step&#x3D;select_account&#x60; and &#x60;connect_token&#x60;, which you pass into the select-account endpoints to finish. The default &#x60;instagram_login&#x60; has no selection step, so it connects the account directly. | [optional][default to &#39;instagram_login&#39;] |
1042
1052
  | **onboarding** | **String** | WhatsApp only. Ignored for every other platform. Controls which screen Meta&#39;s Embedded Signup popup shows. If omitted, the connection defaults to coexistence (same as &#x60;business_app&#x60; below), preserving existing behavior for numbers already on the WhatsApp Business app. &#x60;api&#x60;: standard Embedded Signup, showing Meta&#39;s WABA/number picker. Use this to connect a phone number already on Cloud API elsewhere. &#x60;business_app&#x60;: coexistence, i.e. &#39;Connect existing WhatsApp Business app&#39; (a number shared between Cloud API and the consumer WhatsApp Business app). | [optional] |
1053
+ | **signup** | **String** | WhatsApp only. Rejected with 400 &#x60;INVALID_FIELD_VALUE&#x60; on any other platform. &#x60;hosted&#x60;: &#x60;authUrl&#x60; points at a Zernio-hosted page on zernio.com instead of Meta&#39;s OAuth dialog, and the response carries &#x60;authUrl&#x60; only (no &#x60;state&#x60;). That page opens Meta&#39;s Embedded Signup popup itself, so it learns which WhatsApp Business Account and number the user picked inside the popup and connects exactly that one. Use it when your users&#39; Facebook logins manage several WhatsApp accounts: on the default redirect flow Meta only returns an authorization code, so when that login can see more than one number the user lands on Zernio&#39;s number picker and has to choose again. Nothing to embed on your side and no domain setup: send the user to &#x60;authUrl&#x60;, and they come back to &#x60;redirect_url&#x60; with the same params as the redirect flow. Success: &#x60;connected&#x3D;whatsapp&#x60;, &#x60;profileId&#x60;, &#x60;accountId&#x60;, &#x60;username&#x60; (plus &#x60;connect_token&#x60; for API-key callers). Failure: &#x60;error&#x60; and &#x60;platform&#x3D;whatsapp&#x60;, with the same values and extras as the redirect flow (&#x60;one_whatsapp_per_profile&#x60;, &#x60;whatsapp_number_already_connected&#x60; and &#x60;whatsapp_number_pinned_to_profile&#x60; with &#x60;is_user_fixable&#x3D;true&#x60;; &#x60;payment_required&#x60; with &#x60;reason&#x60; and &#x60;dashboard_url&#x60;; &#x60;whatsapp_error&#x60; with &#x60;error_message&#x60; when Meta reported one), plus two of its own: &#x60;connection_cancelled&#x60; when the popup was closed before finishing (&#x60;error_message&#x60; carries Meta&#39;s last reported step or error when there is one) and &#x60;session_expired&#x60; when the user took longer than the 60 minute window the hosted page is valid for; restart the flow with a new call in that case. &#x60;onboarding&#x60; is carried through and a pre-verified Zernio-provisioned number is attached like on the redirect flow. &#x60;headless&#x60; has no effect here because there is no selection step left to hand you. When a previously disconnected account for this profile can simply be re-enabled, this endpoint re-enables it and returns the account directly instead of a URL, exactly like the redirect flow. The page shows the same guidance as the Zernio dashboard: a pre-verified Zernio-provisioned number is called out by name (\&quot;choose it in Meta&#39;s list, no code will be asked\&quot;), coexistence and standard signups get their explainer video, and a step-by-step follow-along checklist stays visible while Meta&#39;s popup is open. Skin it with &#x60;brandName&#x60;, &#x60;primaryColor&#x60; and &#x60;language&#x60; below. | [optional] |
1054
+ | **brand_name** | **String** | Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): name shown in the page title (\&quot;Connect your WhatsApp number to &lt;brandName&gt;\&quot;) instead of Zernio. The Zernio logo stays: the page is co-branded, not white-label. Trimmed; 1 to 60 characters. Rejected with 400 &#x60;INVALID_FIELD_VALUE&#x60; without &#x60;signup&#x3D;hosted&#x60;. Stored on the signup session at issue time, so the page URL cannot change it. | [optional] |
1055
+ | **primary_color** | **String** | Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): hex colour (&#x60;#RRGGBB&#x60;) for the primary button and step accents. Validated server-side; anything else is a 400 &#x60;INVALID_FIELD_VALUE&#x60;. Rejected without &#x60;signup&#x3D;hosted&#x60;. | [optional] |
1056
+ | **language** | **String** | Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): language of the page and its follow-along guide. Explainer videos stay in English. Default &#x60;en&#x60;. Rejected without &#x60;signup&#x3D;hosted&#x60;. | [optional] |
1043
1057
 
1044
1058
  ### Return type
1045
1059
 
@@ -1767,6 +1781,77 @@ end
1767
1781
  - **Accept**: application/json
1768
1782
 
1769
1783
 
1784
+ ## get_whats_app_sdk_config
1785
+
1786
+ > <GetWhatsAppSdkConfig200Response> get_whats_app_sdk_config(opts)
1787
+
1788
+ Get Embedded Signup SDK config
1789
+
1790
+ The Meta app id and Embedded Signup configuration id the Zernio-hosted signup page uses to open Meta's popup. Integrators do not need this endpoint: start the hosted flow with `GET /v1/connect/whatsapp?signup=hosted` and send the user to the returned `authUrl`. Authenticates with an API key or with the connect token the hosted flow issues (`X-Connect-Token` header).
1791
+
1792
+ ### Examples
1793
+
1794
+ ```ruby
1795
+ require 'time'
1796
+ require 'zernio-sdk'
1797
+ # setup authorization
1798
+ Zernio.configure do |config|
1799
+ # Configure Bearer authorization (JWT): bearerAuth
1800
+ config.access_token = 'YOUR_BEARER_TOKEN'
1801
+ end
1802
+
1803
+ api_instance = Zernio::ConnectApi.new
1804
+ opts = {
1805
+ x_connect_token: 'x_connect_token_example' # String | Connect token issued by the hosted signup flow, accepted instead of an API key.
1806
+ }
1807
+
1808
+ begin
1809
+ # Get Embedded Signup SDK config
1810
+ result = api_instance.get_whats_app_sdk_config(opts)
1811
+ p result
1812
+ rescue Zernio::ApiError => e
1813
+ puts "Error when calling ConnectApi->get_whats_app_sdk_config: #{e}"
1814
+ end
1815
+ ```
1816
+
1817
+ #### Using the get_whats_app_sdk_config_with_http_info variant
1818
+
1819
+ This returns an Array which contains the response data, status code and headers.
1820
+
1821
+ > <Array(<GetWhatsAppSdkConfig200Response>, Integer, Hash)> get_whats_app_sdk_config_with_http_info(opts)
1822
+
1823
+ ```ruby
1824
+ begin
1825
+ # Get Embedded Signup SDK config
1826
+ data, status_code, headers = api_instance.get_whats_app_sdk_config_with_http_info(opts)
1827
+ p status_code # => 2xx
1828
+ p headers # => { ... }
1829
+ p data # => <GetWhatsAppSdkConfig200Response>
1830
+ rescue Zernio::ApiError => e
1831
+ puts "Error when calling ConnectApi->get_whats_app_sdk_config_with_http_info: #{e}"
1832
+ end
1833
+ ```
1834
+
1835
+ ### Parameters
1836
+
1837
+ | Name | Type | Description | Notes |
1838
+ | ---- | ---- | ----------- | ----- |
1839
+ | **x_connect_token** | **String** | Connect token issued by the hosted signup flow, accepted instead of an API key. | [optional] |
1840
+
1841
+ ### Return type
1842
+
1843
+ [**GetWhatsAppSdkConfig200Response**](GetWhatsAppSdkConfig200Response.md)
1844
+
1845
+ ### Authorization
1846
+
1847
+ [bearerAuth](../README.md#bearerAuth)
1848
+
1849
+ ### HTTP request headers
1850
+
1851
+ - **Content-Type**: Not defined
1852
+ - **Accept**: application/json
1853
+
1854
+
1770
1855
  ## get_youtube_captions
1771
1856
 
1772
1857
  > <GetYoutubeCaptions200Response> get_youtube_captions(account_id, video_id, opts)
@@ -0,0 +1,22 @@
1
+ # Zernio::ConnectWhatsAppEmbeddedSignup200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | | [optional] |
8
+ | **account** | [**ConnectWhatsAppEmbeddedSignup200ResponseAccount**](ConnectWhatsAppEmbeddedSignup200ResponseAccount.md) | | [optional] |
9
+ | **redirect_url** | **String** | Present only when &#x60;redirectUrl&#x60; was sent; also present on error responses. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::ConnectWhatsAppEmbeddedSignup200Response.new(
17
+ message: null,
18
+ account: null,
19
+ redirect_url: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,28 @@
1
+ # Zernio::ConnectWhatsAppEmbeddedSignup200ResponseAccount
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | | [optional] |
8
+ | **platform** | **String** | | [optional] |
9
+ | **username** | **String** | | [optional] |
10
+ | **display_name** | **String** | | [optional] |
11
+ | **is_active** | **Boolean** | | [optional] |
12
+ | **selected_phone_number** | **String** | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'zernio-sdk'
18
+
19
+ instance = Zernio::ConnectWhatsAppEmbeddedSignup200ResponseAccount.new(
20
+ account_id: null,
21
+ platform: null,
22
+ username: null,
23
+ display_name: null,
24
+ is_active: null,
25
+ selected_phone_number: null
26
+ )
27
+ ```
28
+
@@ -10,6 +10,8 @@
10
10
  | **phone_number_id** | **String** | | [optional] |
11
11
  | **is_coexistence** | **Boolean** | Number is also live in the WhatsApp Business app | [optional] |
12
12
  | **expected_phone_number** | **String** | Rejects the connect when Meta returns a different number | [optional] |
13
+ | **redirect_url** | **String** | Hosted signup page only. When present, the response also carries &#x60;redirectUrl&#x60;, the URL the user should land on, with the outcome mapped exactly like the redirect flow (success params, or &#x60;error&#x60; and &#x60;platform&#x60; with the same values). Must be an absolute http(s) URL or a custom app scheme. | [optional] |
14
+ | **echo_connect_token** | **Boolean** | Hosted signup page only. Append the connect token to the success redirect, as the redirect flow does for API-key callers. | [optional] |
13
15
 
14
16
  ## Example
15
17
 
@@ -22,7 +24,9 @@ instance = Zernio::ConnectWhatsAppEmbeddedSignupRequest.new(
22
24
  waba_id: null,
23
25
  phone_number_id: null,
24
26
  is_coexistence: null,
25
- expected_phone_number: null
27
+ expected_phone_number: null,
28
+ redirect_url: null,
29
+ echo_connect_token: null
26
30
  )
27
31
  ```
28
32
 
@@ -0,0 +1,22 @@
1
+ # Zernio::GetWhatsAppSdkConfig200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **app_id** | **String** | Meta app id | |
8
+ | **config_id** | **String** | Embedded Signup configuration id | |
9
+ | **branding** | [**GetWhatsAppSdkConfig200ResponseBranding**](GetWhatsAppSdkConfig200ResponseBranding.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::GetWhatsAppSdkConfig200Response.new(
17
+ app_id: null,
18
+ config_id: null,
19
+ branding: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # Zernio::GetWhatsAppSdkConfig200ResponseBranding
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **brand_name** | **String** | | [optional] |
8
+ | **primary_color** | **String** | Hex colour, #RRGGBB | [optional] |
9
+ | **language** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::GetWhatsAppSdkConfig200ResponseBranding.new(
17
+ brand_name: null,
18
+ primary_color: null,
19
+ language: null
20
+ )
21
+ ```
22
+
@@ -798,20 +798,22 @@ module Zernio
798
798
  end
799
799
 
800
800
  # Connect WhatsApp from Embedded Signup
801
- # Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
801
+ # Exchange the authorization code Meta's Embedded Signup popup returned. This is the call the Zernio-hosted signup page makes after the popup closes (`GET /v1/connect/whatsapp?signup=hosted`), sending the `wabaId` and `phoneNumberId` Meta reported so exactly the chosen number is connected; when both are omitted the first number the token can see is used. The code never passes through a `redirect_uri`, so `POST /v1/connect/{platform}` cannot accept it. Authenticates with an API key, or with the connect token the hosted flow issues (`X-Connect-Token` header).
802
802
  # @param connect_whats_app_embedded_signup_request [ConnectWhatsAppEmbeddedSignupRequest]
803
803
  # @param [Hash] opts the optional parameters
804
- # @return [nil]
804
+ # @option opts [String] :x_connect_token Connect token issued by the hosted signup flow, accepted instead of an API key.
805
+ # @return [ConnectWhatsAppEmbeddedSignup200Response]
805
806
  def connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request, opts = {})
806
- connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts)
807
- nil
807
+ data, _status_code, _headers = connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts)
808
+ data
808
809
  end
809
810
 
810
811
  # Connect WhatsApp from Embedded Signup
811
- # Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
812
+ # Exchange the authorization code Meta&#39;s Embedded Signup popup returned. This is the call the Zernio-hosted signup page makes after the popup closes (&#x60;GET /v1/connect/whatsapp?signup&#x3D;hosted&#x60;), sending the &#x60;wabaId&#x60; and &#x60;phoneNumberId&#x60; Meta reported so exactly the chosen number is connected; when both are omitted the first number the token can see is used. The code never passes through a &#x60;redirect_uri&#x60;, so &#x60;POST /v1/connect/{platform}&#x60; cannot accept it. Authenticates with an API key, or with the connect token the hosted flow issues (&#x60;X-Connect-Token&#x60; header).
812
813
  # @param connect_whats_app_embedded_signup_request [ConnectWhatsAppEmbeddedSignupRequest]
813
814
  # @param [Hash] opts the optional parameters
814
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
815
+ # @option opts [String] :x_connect_token Connect token issued by the hosted signup flow, accepted instead of an API key.
816
+ # @return [Array<(ConnectWhatsAppEmbeddedSignup200Response, Integer, Hash)>] ConnectWhatsAppEmbeddedSignup200Response data, response status code and response headers
815
817
  def connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts = {})
816
818
  if @api_client.config.debugging
817
819
  @api_client.config.logger.debug 'Calling API: ConnectApi.connect_whats_app_embedded_signup ...'
@@ -835,6 +837,7 @@ module Zernio
835
837
  if !content_type.nil?
836
838
  header_params['Content-Type'] = content_type
837
839
  end
840
+ header_params[:'X-Connect-Token'] = opts[:'x_connect_token'] if !opts[:'x_connect_token'].nil?
838
841
 
839
842
  # form parameters
840
843
  form_params = opts[:form_params] || {}
@@ -843,7 +846,7 @@ module Zernio
843
846
  post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_whats_app_embedded_signup_request)
844
847
 
845
848
  # return_type
846
- return_type = opts[:debug_return_type]
849
+ return_type = opts[:debug_return_type] || 'ConnectWhatsAppEmbeddedSignup200Response'
847
850
 
848
851
  # auth_names
849
852
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -948,6 +951,10 @@ module Zernio
948
951
  # @option opts [Boolean] :headless When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio&#39;s default account selection UI. Use this to build a custom connect experience. (default to false)
949
952
  # @option opts [String] :login_method Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. &#x60;instagram_login&#x60; (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. &#x60;facebook_login&#x60;: the Facebook Login dialog, i.e. \&quot;Instagram API with Facebook Login\&quot;. The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, &#x60;/v1/connect/instagram/select-account&#x60;. &#x60;facebook_login&#x60; supports &#x60;headless&#x3D;true&#x60; like the other selection platforms: the callback redirects to your &#x60;redirect_url&#x60; with &#x60;profileId&#x60;, &#x60;tempToken&#x60;, &#x60;platform&#x3D;instagram&#x60;, &#x60;step&#x3D;select_account&#x60; and &#x60;connect_token&#x60;, which you pass into the select-account endpoints to finish. The default &#x60;instagram_login&#x60; has no selection step, so it connects the account directly. (default to 'instagram_login')
950
953
  # @option opts [String] :onboarding WhatsApp only. Ignored for every other platform. Controls which screen Meta&#39;s Embedded Signup popup shows. If omitted, the connection defaults to coexistence (same as &#x60;business_app&#x60; below), preserving existing behavior for numbers already on the WhatsApp Business app. &#x60;api&#x60;: standard Embedded Signup, showing Meta&#39;s WABA/number picker. Use this to connect a phone number already on Cloud API elsewhere. &#x60;business_app&#x60;: coexistence, i.e. &#39;Connect existing WhatsApp Business app&#39; (a number shared between Cloud API and the consumer WhatsApp Business app).
954
+ # @option opts [String] :signup WhatsApp only. Rejected with 400 &#x60;INVALID_FIELD_VALUE&#x60; on any other platform. &#x60;hosted&#x60;: &#x60;authUrl&#x60; points at a Zernio-hosted page on zernio.com instead of Meta&#39;s OAuth dialog, and the response carries &#x60;authUrl&#x60; only (no &#x60;state&#x60;). That page opens Meta&#39;s Embedded Signup popup itself, so it learns which WhatsApp Business Account and number the user picked inside the popup and connects exactly that one. Use it when your users&#39; Facebook logins manage several WhatsApp accounts: on the default redirect flow Meta only returns an authorization code, so when that login can see more than one number the user lands on Zernio&#39;s number picker and has to choose again. Nothing to embed on your side and no domain setup: send the user to &#x60;authUrl&#x60;, and they come back to &#x60;redirect_url&#x60; with the same params as the redirect flow. Success: &#x60;connected&#x3D;whatsapp&#x60;, &#x60;profileId&#x60;, &#x60;accountId&#x60;, &#x60;username&#x60; (plus &#x60;connect_token&#x60; for API-key callers). Failure: &#x60;error&#x60; and &#x60;platform&#x3D;whatsapp&#x60;, with the same values and extras as the redirect flow (&#x60;one_whatsapp_per_profile&#x60;, &#x60;whatsapp_number_already_connected&#x60; and &#x60;whatsapp_number_pinned_to_profile&#x60; with &#x60;is_user_fixable&#x3D;true&#x60;; &#x60;payment_required&#x60; with &#x60;reason&#x60; and &#x60;dashboard_url&#x60;; &#x60;whatsapp_error&#x60; with &#x60;error_message&#x60; when Meta reported one), plus two of its own: &#x60;connection_cancelled&#x60; when the popup was closed before finishing (&#x60;error_message&#x60; carries Meta&#39;s last reported step or error when there is one) and &#x60;session_expired&#x60; when the user took longer than the 60 minute window the hosted page is valid for; restart the flow with a new call in that case. &#x60;onboarding&#x60; is carried through and a pre-verified Zernio-provisioned number is attached like on the redirect flow. &#x60;headless&#x60; has no effect here because there is no selection step left to hand you. When a previously disconnected account for this profile can simply be re-enabled, this endpoint re-enables it and returns the account directly instead of a URL, exactly like the redirect flow. The page shows the same guidance as the Zernio dashboard: a pre-verified Zernio-provisioned number is called out by name (\&quot;choose it in Meta&#39;s list, no code will be asked\&quot;), coexistence and standard signups get their explainer video, and a step-by-step follow-along checklist stays visible while Meta&#39;s popup is open. Skin it with &#x60;brandName&#x60;, &#x60;primaryColor&#x60; and &#x60;language&#x60; below.
955
+ # @option opts [String] :brand_name Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): name shown in the page title (\&quot;Connect your WhatsApp number to &lt;brandName&gt;\&quot;) instead of Zernio. The Zernio logo stays: the page is co-branded, not white-label. Trimmed; 1 to 60 characters. Rejected with 400 &#x60;INVALID_FIELD_VALUE&#x60; without &#x60;signup&#x3D;hosted&#x60;. Stored on the signup session at issue time, so the page URL cannot change it.
956
+ # @option opts [String] :primary_color Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): hex colour (&#x60;#RRGGBB&#x60;) for the primary button and step accents. Validated server-side; anything else is a 400 &#x60;INVALID_FIELD_VALUE&#x60;. Rejected without &#x60;signup&#x3D;hosted&#x60;.
957
+ # @option opts [String] :language Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): language of the page and its follow-along guide. Explainer videos stay in English. Default &#x60;en&#x60;. Rejected without &#x60;signup&#x3D;hosted&#x60;.
951
958
  # @return [GetConnectUrl200Response]
952
959
  def get_connect_url(platform, profile_id, opts = {})
953
960
  data, _status_code, _headers = get_connect_url_with_http_info(platform, profile_id, opts)
@@ -963,6 +970,10 @@ module Zernio
963
970
  # @option opts [Boolean] :headless When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio&#39;s default account selection UI. Use this to build a custom connect experience. (default to false)
964
971
  # @option opts [String] :login_method Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. &#x60;instagram_login&#x60; (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. &#x60;facebook_login&#x60;: the Facebook Login dialog, i.e. \&quot;Instagram API with Facebook Login\&quot;. The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, &#x60;/v1/connect/instagram/select-account&#x60;. &#x60;facebook_login&#x60; supports &#x60;headless&#x3D;true&#x60; like the other selection platforms: the callback redirects to your &#x60;redirect_url&#x60; with &#x60;profileId&#x60;, &#x60;tempToken&#x60;, &#x60;platform&#x3D;instagram&#x60;, &#x60;step&#x3D;select_account&#x60; and &#x60;connect_token&#x60;, which you pass into the select-account endpoints to finish. The default &#x60;instagram_login&#x60; has no selection step, so it connects the account directly. (default to 'instagram_login')
965
972
  # @option opts [String] :onboarding WhatsApp only. Ignored for every other platform. Controls which screen Meta&#39;s Embedded Signup popup shows. If omitted, the connection defaults to coexistence (same as &#x60;business_app&#x60; below), preserving existing behavior for numbers already on the WhatsApp Business app. &#x60;api&#x60;: standard Embedded Signup, showing Meta&#39;s WABA/number picker. Use this to connect a phone number already on Cloud API elsewhere. &#x60;business_app&#x60;: coexistence, i.e. &#39;Connect existing WhatsApp Business app&#39; (a number shared between Cloud API and the consumer WhatsApp Business app).
973
+ # @option opts [String] :signup WhatsApp only. Rejected with 400 &#x60;INVALID_FIELD_VALUE&#x60; on any other platform. &#x60;hosted&#x60;: &#x60;authUrl&#x60; points at a Zernio-hosted page on zernio.com instead of Meta&#39;s OAuth dialog, and the response carries &#x60;authUrl&#x60; only (no &#x60;state&#x60;). That page opens Meta&#39;s Embedded Signup popup itself, so it learns which WhatsApp Business Account and number the user picked inside the popup and connects exactly that one. Use it when your users&#39; Facebook logins manage several WhatsApp accounts: on the default redirect flow Meta only returns an authorization code, so when that login can see more than one number the user lands on Zernio&#39;s number picker and has to choose again. Nothing to embed on your side and no domain setup: send the user to &#x60;authUrl&#x60;, and they come back to &#x60;redirect_url&#x60; with the same params as the redirect flow. Success: &#x60;connected&#x3D;whatsapp&#x60;, &#x60;profileId&#x60;, &#x60;accountId&#x60;, &#x60;username&#x60; (plus &#x60;connect_token&#x60; for API-key callers). Failure: &#x60;error&#x60; and &#x60;platform&#x3D;whatsapp&#x60;, with the same values and extras as the redirect flow (&#x60;one_whatsapp_per_profile&#x60;, &#x60;whatsapp_number_already_connected&#x60; and &#x60;whatsapp_number_pinned_to_profile&#x60; with &#x60;is_user_fixable&#x3D;true&#x60;; &#x60;payment_required&#x60; with &#x60;reason&#x60; and &#x60;dashboard_url&#x60;; &#x60;whatsapp_error&#x60; with &#x60;error_message&#x60; when Meta reported one), plus two of its own: &#x60;connection_cancelled&#x60; when the popup was closed before finishing (&#x60;error_message&#x60; carries Meta&#39;s last reported step or error when there is one) and &#x60;session_expired&#x60; when the user took longer than the 60 minute window the hosted page is valid for; restart the flow with a new call in that case. &#x60;onboarding&#x60; is carried through and a pre-verified Zernio-provisioned number is attached like on the redirect flow. &#x60;headless&#x60; has no effect here because there is no selection step left to hand you. When a previously disconnected account for this profile can simply be re-enabled, this endpoint re-enables it and returns the account directly instead of a URL, exactly like the redirect flow. The page shows the same guidance as the Zernio dashboard: a pre-verified Zernio-provisioned number is called out by name (\&quot;choose it in Meta&#39;s list, no code will be asked\&quot;), coexistence and standard signups get their explainer video, and a step-by-step follow-along checklist stays visible while Meta&#39;s popup is open. Skin it with &#x60;brandName&#x60;, &#x60;primaryColor&#x60; and &#x60;language&#x60; below.
974
+ # @option opts [String] :brand_name Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): name shown in the page title (\&quot;Connect your WhatsApp number to &lt;brandName&gt;\&quot;) instead of Zernio. The Zernio logo stays: the page is co-branded, not white-label. Trimmed; 1 to 60 characters. Rejected with 400 &#x60;INVALID_FIELD_VALUE&#x60; without &#x60;signup&#x3D;hosted&#x60;. Stored on the signup session at issue time, so the page URL cannot change it.
975
+ # @option opts [String] :primary_color Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): hex colour (&#x60;#RRGGBB&#x60;) for the primary button and step accents. Validated server-side; anything else is a 400 &#x60;INVALID_FIELD_VALUE&#x60;. Rejected without &#x60;signup&#x3D;hosted&#x60;.
976
+ # @option opts [String] :language Hosted signup page only (&#x60;signup&#x3D;hosted&#x60;, WhatsApp): language of the page and its follow-along guide. Explainer videos stay in English. Default &#x60;en&#x60;. Rejected without &#x60;signup&#x3D;hosted&#x60;.
966
977
  # @return [Array<(GetConnectUrl200Response, Integer, Hash)>] GetConnectUrl200Response data, response status code and response headers
967
978
  def get_connect_url_with_http_info(platform, profile_id, opts = {})
968
979
  if @api_client.config.debugging
@@ -989,6 +1000,27 @@ module Zernio
989
1000
  if @api_client.config.client_side_validation && opts[:'onboarding'] && !allowable_values.include?(opts[:'onboarding'])
990
1001
  fail ArgumentError, "invalid value for \"onboarding\", must be one of #{allowable_values}"
991
1002
  end
1003
+ allowable_values = ["hosted"]
1004
+ if @api_client.config.client_side_validation && opts[:'signup'] && !allowable_values.include?(opts[:'signup'])
1005
+ fail ArgumentError, "invalid value for \"signup\", must be one of #{allowable_values}"
1006
+ end
1007
+ if @api_client.config.client_side_validation && !opts[:'brand_name'].nil? && opts[:'brand_name'].to_s.length > 60
1008
+ fail ArgumentError, 'invalid value for "opts[:"brand_name"]" when calling ConnectApi.get_connect_url, the character length must be smaller than or equal to 60.'
1009
+ end
1010
+
1011
+ if @api_client.config.client_side_validation && !opts[:'brand_name'].nil? && opts[:'brand_name'].to_s.length < 1
1012
+ fail ArgumentError, 'invalid value for "opts[:"brand_name"]" when calling ConnectApi.get_connect_url, the character length must be greater than or equal to 1.'
1013
+ end
1014
+
1015
+ pattern = Regexp.new(/^#[0-9a-fA-F]{6}$/)
1016
+ if @api_client.config.client_side_validation && !opts[:'primary_color'].nil? && opts[:'primary_color'] !~ pattern
1017
+ fail ArgumentError, "invalid value for 'opts[:\"primary_color\"]' when calling ConnectApi.get_connect_url, must conform to the pattern #{pattern}."
1018
+ end
1019
+
1020
+ allowable_values = ["en", "es"]
1021
+ if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
1022
+ fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}"
1023
+ end
992
1024
  # resource path
993
1025
  local_var_path = '/v1/connect/{platform}'.sub('{' + 'platform' + '}', CGI.escape(platform.to_s))
994
1026
 
@@ -999,6 +1031,10 @@ module Zernio
999
1031
  query_params[:'headless'] = opts[:'headless'] if !opts[:'headless'].nil?
1000
1032
  query_params[:'loginMethod'] = opts[:'login_method'] if !opts[:'login_method'].nil?
1001
1033
  query_params[:'onboarding'] = opts[:'onboarding'] if !opts[:'onboarding'].nil?
1034
+ query_params[:'signup'] = opts[:'signup'] if !opts[:'signup'].nil?
1035
+ query_params[:'brandName'] = opts[:'brand_name'] if !opts[:'brand_name'].nil?
1036
+ query_params[:'primaryColor'] = opts[:'primary_color'] if !opts[:'primary_color'].nil?
1037
+ query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
1002
1038
 
1003
1039
  # header parameters
1004
1040
  header_params = opts[:header_params] || {}
@@ -1714,6 +1750,66 @@ module Zernio
1714
1750
  return data, status_code, headers
1715
1751
  end
1716
1752
 
1753
+ # Get Embedded Signup SDK config
1754
+ # The Meta app id and Embedded Signup configuration id the Zernio-hosted signup page uses to open Meta's popup. Integrators do not need this endpoint: start the hosted flow with `GET /v1/connect/whatsapp?signup=hosted` and send the user to the returned `authUrl`. Authenticates with an API key or with the connect token the hosted flow issues (`X-Connect-Token` header).
1755
+ # @param [Hash] opts the optional parameters
1756
+ # @option opts [String] :x_connect_token Connect token issued by the hosted signup flow, accepted instead of an API key.
1757
+ # @return [GetWhatsAppSdkConfig200Response]
1758
+ def get_whats_app_sdk_config(opts = {})
1759
+ data, _status_code, _headers = get_whats_app_sdk_config_with_http_info(opts)
1760
+ data
1761
+ end
1762
+
1763
+ # Get Embedded Signup SDK config
1764
+ # The Meta app id and Embedded Signup configuration id the Zernio-hosted signup page uses to open Meta&#39;s popup. Integrators do not need this endpoint: start the hosted flow with &#x60;GET /v1/connect/whatsapp?signup&#x3D;hosted&#x60; and send the user to the returned &#x60;authUrl&#x60;. Authenticates with an API key or with the connect token the hosted flow issues (&#x60;X-Connect-Token&#x60; header).
1765
+ # @param [Hash] opts the optional parameters
1766
+ # @option opts [String] :x_connect_token Connect token issued by the hosted signup flow, accepted instead of an API key.
1767
+ # @return [Array<(GetWhatsAppSdkConfig200Response, Integer, Hash)>] GetWhatsAppSdkConfig200Response data, response status code and response headers
1768
+ def get_whats_app_sdk_config_with_http_info(opts = {})
1769
+ if @api_client.config.debugging
1770
+ @api_client.config.logger.debug 'Calling API: ConnectApi.get_whats_app_sdk_config ...'
1771
+ end
1772
+ # resource path
1773
+ local_var_path = '/v1/connect/whatsapp/sdk-config'
1774
+
1775
+ # query parameters
1776
+ query_params = opts[:query_params] || {}
1777
+
1778
+ # header parameters
1779
+ header_params = opts[:header_params] || {}
1780
+ # HTTP header 'Accept' (if needed)
1781
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1782
+ header_params[:'X-Connect-Token'] = opts[:'x_connect_token'] if !opts[:'x_connect_token'].nil?
1783
+
1784
+ # form parameters
1785
+ form_params = opts[:form_params] || {}
1786
+
1787
+ # http body (model)
1788
+ post_body = opts[:debug_body]
1789
+
1790
+ # return_type
1791
+ return_type = opts[:debug_return_type] || 'GetWhatsAppSdkConfig200Response'
1792
+
1793
+ # auth_names
1794
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1795
+
1796
+ new_options = opts.merge(
1797
+ :operation => :"ConnectApi.get_whats_app_sdk_config",
1798
+ :header_params => header_params,
1799
+ :query_params => query_params,
1800
+ :form_params => form_params,
1801
+ :body => post_body,
1802
+ :auth_names => auth_names,
1803
+ :return_type => return_type
1804
+ )
1805
+
1806
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1807
+ if @api_client.config.debugging
1808
+ @api_client.config.logger.debug "API called: ConnectApi#get_whats_app_sdk_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1809
+ end
1810
+ return data, status_code, headers
1811
+ end
1812
+
1717
1813
  # Get a YouTube video transcript
1718
1814
  # Returns the caption track YouTube already holds for one of the connected channel's own videos, as plain text plus timed cues. Use it instead of downloading and transcribing the video yourself. Auto-generated (ASR) tracks are included: YouTube serves them to the channel owner, which is what the connected account is. Uploaded tracks win over auto-generated ones when both exist for a language. Caching: we store the transcript on first read and serve it from there afterwards, so you do not need to cache it yourself. A cached read costs no YouTube quota and does not call YouTube at all. `source` tells you which happened (`youtube` on the first read, `cache` after). Pass `refresh=true` only when the captions actually changed on YouTube, since that re-downloads. Notes: - Only videos owned by this connected channel. Anything else returns 404. - `contentDetails.caption` in YouTube's own API reads `false` on videos that DO have a serving auto-generated track, so it is not a usable availability signal. Call this endpoint and handle the 404. - YouTube generates auto-captions only for videos with recognisable speech, and can take a few hours after upload to publish them.
1719
1815
  # @param account_id [String] The connected YouTube account.