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
- Make sure you have generated Access Token in your Magento admin correctly - learn more or check this video.
- Make sure you have granted ALL or necessary API Permissions to Calcurates in your Magento admin > Integration settings.
- If you are getting 401 returned for [website URL] or The consumer isn't authorized, then check the following:
- 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:
bin/magento config:set oauth/consumer/enable_integration_as_bearer 1
- Check if your Magento website has a password protection (basic auth). In this case our server is unable to reach it. Possible solutions:
- Remove it or whitelist IP Address for api.calcurates.com.
- Disable basic auth for REST API. See examples for Apache и Nginx below.
- Use OAuth authorisation type instead of Token Based one. It is available in the Website's Settings > Platform Sync (Magento 2) section.
How to disable basic auth for REST API
For Apache insert the following code after basic auth code:
SetEnvIf Request_URI /rest rest_url
Order Allow,Deny
Satisfy any
<RequireAny>
Require env rest_url
Require valid-user
</RequireAny>
For Nginx insert the following code after basic auth code:
location /rest/ {
auth_basic off;
allow all;
}
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 ...
Carriers: display real-time carrier rates from certain carriers
Overview With Calcurates you can display real-time shipping rates and estimated delivery dates from certain carriers we support by connecting your own carrier accounts (UPS, FedEx, USPS, DHL, Canada Post, Australia Post, Aramex / Fastway and more) ...
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 ...