Magento 2 website sync: troubleshoot guide

Magento 2 website sync: troubleshoot guide

Problem

If you are getting an error when trying to sync your Magento website with Calcurates, please read an error message and refer to one of the following solutions.


Possible solutions

  1. Make sure you have generated Access Token in your Magento admin correctly - learn more or check this video.
  2. Make sure you have granted ALL or necessary API Permissions to Calcurates in your Magento admin > Integration settings.
  3. If you are getting 401 returned for [website URL] or The consumer isn't authorized, then check the following:
    1. Check your Magento admin: Stores > Configuration > Services > OAuth > Consumer Settings > Set Allow OAuth Access Tokens to be used as standalone Bearer tokens option to Yes. You can also enable this setting from the CLI by running the following command:
      1bin/magento config:set oauth/consumer/enable_integration_as_bearer 1
    2. Check if your Magento website has a password protection (basic auth). In this case our server is unable to reach it. Possible solutions:
      1. Remove it or whitelist IP Address for api.calcurates.com.
      2. Disable basic auth for REST API. See examples for Apache и Nginx below.
    3. Use OAuth authorisation type instead of Token Based one. It is available in the Website's Settings > Platform Sync (Magento 2) section.
  4. If you are getting 503 returned for [website URL], then make sure your Magento instance is not under the maintenance mode.

How to disable basic auth for REST API

For Apache insert the following code after basic auth code:

1SetEnvIf Request_URI /rest rest_url 2Order Allow,Deny 3Satisfy any 4<RequireAny> 5 Require env rest_url 6 Require valid-user 7</RequireAny>

For Nginx insert the following code after basic auth code:

1location /rest/ { 2 auth_basic off; 3 allow all; 4}

    • Related Articles

    • How to add and connect a Magento 2 Website to Calcurates

      Video: How to Add a Magento Website to Your Calcurates Account Overview The "Websites" section in Calcurates allows you to manage which Magento websites your shipping methods and rates logic is done for. Adding a new website provides the Calcurates ...
    • How to add and connect a WooCommerce website to Calcurates

      Video: How to Add a WooCommerce Website to Your Calcurates Account Websites grid To see the Websites grid you should follow Menu > Websites. There are 7 columns in the Websites grid: Website ID - internal ID of a website; Name - website name ...
    • How to sync Carrier services and packages

      Before adding a carrier as a Shipping Option: It must be connected to your Calcurates account. How to connect a Carrier. Carrier's services and packages must be synced. This article explains how to do it. Note, that you can only sync services and ...
    • Rate Shopping: compare rates from multiple carriers in real-time and display the lowest ones at the checkout

      Overview After you connect your own carrier accounts (UPS, FedEx, USPS, DHL, Canada Post, Australia Post, Aramex / Fastway and more) with the Rate Shopping feature a you may compare rates from multiple carriers in real-time and display the lowest ...
    • How to set Free Shipping option

      How to Configure Free Shipping in Calcurates? Free Shipping features The Free Shipping option in Calcurates allows you to offer free shipping using customizable conditions, such as specific shipping areas, minimum order subtotal thresholds, and SKU ...