Home › Forums › GoogleSync › AutoSync trigger not working (topic 2)
Tagged: autosync - Sync Data
- This topic has 15 replies, 2 voices, and was last updated 1 month, 1 week ago by S P.
-
AuthorPosts
-
October 19, 2024 at 7:48 am #163043S PParticipant
Greetings,
After updating to latest version, auto sync still has error:
”
Error while connecting your site: Exception: Request failed for https://kalahamrah.com returned code 401. Truncated server response: {“code”:”invalid_username”,”message”:”\u062e\u0637\u0627:<\/strong> \u0646\u0627\u0645 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0646\u0627\u0… (use muteHttpExceptions option to examine full response)
”
Would you mind helping us?
Many thanks.October 19, 2024 at 9:56 am #163044S PParticipantWe’ve solved the problem:
the problem was with credentials.
the API user and API Secret key were not included on setting page of the sheets.
we added this two fields manually using a new API key from Woocommerce.
thanks for your helps.October 20, 2024 at 8:04 am #163046S PParticipantGreetings,
Auto sync changes the credentials which we’ve set up on setting page and changes them to the settings that are unknown.
can you solve this problem?
thanksOctober 22, 2024 at 4:37 am #163072nmediaKeymasterHi,
when the new sheet is being connected the API keys then copied from your site for sheet. You can do follow steps:
1. remove all api keys generated by BPS if found (by the way our script try to remove unused api keys)
2. Re-connect sheet.
3. Then check if sheet settings has correct api keys.October 22, 2024 at 12:49 pm #163081S PParticipantGreetings,
Thanks for your support.
As we don’t use “Auto Fetch” option for getting our products from website to import them in sheet, do we need pro version of plugin or not?
if not, can we disable or remove it from our website?
Many ThanksOctober 23, 2024 at 4:34 am #163089nmediaKeymasterHi,
there are many other features which are in PRO, like variations syncing, AutoSync, and much more.
October 28, 2024 at 4:08 pm #163147S PParticipantHello, in version 7.6, there was a problem with canceling the WooCommerce API, the problem can be solved with the dedicated API, and the automatic update part worked, but since today, when the 8.5 update came, it is not updated manually, and we are faced with the following error
Address unavailable: https://kalahamrah.com/wp-json/wbps/v1/product-syncOctober 29, 2024 at 4:06 am #163150nmediaKeymasterHi,
do you mean in Pro version you have this issue? and plz explain it more…
October 29, 2024 at 8:21 am #163152S PParticipanthello
Your API keys will not work as automatic synchronization. It works when I use my API key, but after a few keys, our API key is rejected and I get your API key again. This is a problem with the Pro version.When the price is Sync Data
It was updated, I encountered the following error and the update failed
Unavailable URL: https://kalahamrah.com/wp-json/wbps/v1/product-syncOctober 30, 2024 at 4:03 am #163189nmediaKeymasterWell, first of all we don’t have any API key provided which api keys are you talking about?
November 1, 2024 at 10:03 am #163205S PParticipantGreetings,
When we do AutoSync triggered by “deployment” on “head” and “Event” “From spreadsheet – On change” the website API endpoint returns 404 error:
Error while connecting your site: Exception: Address unavailable: “mysiteAddress”/wp-json/wc/v3/products/batchAnd when we do “Extensions” > “Bulk Product Sync…” > “Sync Data” it returns 404 error:
Address unavailable: “mysiteAddress”/wp-json/wc/v3/products/batchMoreover, when we do “Sync Data” the “API KEY” and “API SECRET” which we made on our “Woocommerce REST API” getting reset and changed by an unknow values which we don’t know from where they come.
As these errors occurred, the sheet doesn’t work and our products prices not changing.
Can you help us with these problems?
Many Thanks.
November 2, 2024 at 4:31 am #163211nmediaKeymasterThe API keys are generated by our connection setup, if you doing manually something plz don’t do this otherwise things will be messed up.
November 4, 2024 at 8:06 am #163217S PParticipanthello
When the AutoSync system is activated directly with this error when connecting your site: Exception: URL not available: https://kalahamrah.com/wp-json/wc/v3/products/batch
I encounter and the trigger is completed and the prices of the products are not updated and I encounter the above error.Direct automatic synchronization
It doesn’t work, what should I do?November 5, 2024 at 4:09 am #163251nmediaKeymasterHi,
well it seems your site has WooCommerce REST API disabled somehow, you need to make sure that it is enabled and not being blocked by any other plugin like security plugins.
November 5, 2024 at 12:29 pm #163256S PParticipantGreetings,
As we have a security issue with REST API on our website, we’ve added this code for restricting the API from other users than ADMIN users and moreover we’ve made the REST API available for the REST API KEYS that stored in <tableprefix>_woocommerce_api_keys:function restrict_rest_api_access($access) { global $wpdb; // Allow access if the user is logged in and has the 'administrator' role if (is_user_logged_in() && current_user_can('administrator')) { return $access; } // Check if WooCommerce REST API credentials are provided in the request $headers = getallheaders(); if (isset($headers['Authorization'])) { // Decode the Authorization header (Base64 encoded) $auth_header = base64_decode(substr($headers['Authorization'], 6)); // Remove "Basic " prefix list($consumer_key, $consumer_secret) = explode(':', $auth_header); // Query the database to see if these credentials exist $result = $wpdb->get_row($wpdb->prepare( "SELECT consumer_key, consumer_secret FROM {$wpdb->prefix}woocommerce_api_keys WHERE consumer_key = %s AND consumer_secret = %s LIMIT 1", $consumer_key, $consumer_secret )); // If a matching result is found, grant access if ($result) { return $access; // Allow access for valid WooCommerce API keys } } // Otherwise, deny access to REST API return new WP_Error( 'rest_forbidden', __('You are not allowed to access the REST API.'), array('status' => 403) ); } add_filter('rest_authentication_errors', 'restrict_rest_api_access');
As I said before, we NEED to HIDE our REST API from ALL USERS other than ADMINS.
When we want to setup the sheet, in step 1 after entering our website address, these errors are shown:- Please make sure the BPS plugin is installed and activated.
- If your website is under a “Coming Soon” mode, please disable it.
- If your website has an HTTP password, please disable it.
Can you help us to keep our security concern beside setting up your plugin correctly?
Many Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.