This guide explains how to connect a Magento 2 store to HexaSync for the first time, check the data after connecting, and re-authorize when the Access Token changes. When you finish, you will have a Magento 2 Connector App for checking inventory data before you connect another system.
Before you start
In HexaSync, a Connector App is the app that connects to Magento 2. HexaSync connects with the Access Token of an Integration that you create in the Magento 2 admin.
- A Beehexa account to access HexaSync Automation Engine. If you do not have one yet, sign up on the same page.
- A Magento 2 store (Magento Open Source or Adobe Commerce) and the store’s Store URL, for example
https://shop.example.com. If Magento 2 runs in a subdirectory, keep that directory, for examplehttps://example.com/shop. - A Magento 2 admin account with permission to create an Integration and edit the store configuration. You will need to enter this account’s password.
Is the store behind a firewall? If the store is behind a firewall (for example Cloudflare), contact HexaSync at support@beehexa.com to get the list of HexaSync IP addresses, then ask your technical team to allow these IP addresses.
Security note: The Access Token is as valuable as a password. Do not send the Access Token through chat groups, regular email or error screenshots.
Part 1: Authorize the Magento 2 connection on HexaSync
Step 1: Sign in to HexaSync
- Go to HexaSync Automation Engine and sign in with your Beehexa account.
Step 2: Start the Magento 2 connection
- Open the Magento 2 connection setup on HexaSync.
- On the Check connection details screen, on the Magento 2 card (which shows Not connected), select Connect.
- If your HexaSync account has connected to this store before: the Choose an app to connect to Magento 2 screen shows the app for that store. Select Continue and go to Step 6.
- If this is the first time you connect: HexaSync shows the Connect HexaSync to your Magento 2 store screen. Follow the steps below in order: keep this screen open and do Step 3 and Step 4 in Magento 2 in another tab.
Step 3: Create an Integration in Magento 2 and get the Access Token
- Sign in to the Magento 2 admin, open System › Extensions › Integrations and select Add New Integration.
- In Name, enter HexaSync. In Your Password, enter the password of the admin account you are using. Leave Callback URL and Identity link URL empty.
- Open the API tab. In Resource Access, select Custom, then check Catalog and Stores so that HexaSync can read inventory data. Select Save.
- In the Integrations list, select Activate on the HexaSync row, then select Allow.
- Copy the Access Token and store it in a safe place, then select Done.
Note: Use the Access Token only. Do not use the Consumer Key, Consumer Secret or Access Token Secret.
Official reference: Integrations in the Adobe Commerce documentation
Step 4: Allow Access Tokens on Magento 2.4.4 and later
From Magento 2.4.4, if this setting is not turned on, Magento 2 rejects every request from HexaSync. You can see the Magento 2 version in the bottom right corner of the admin.
- Open Stores › Settings › Configuration, select Services › OAuth and open the Consumer Settings section.
- In Allow OAuth Access Tokens to be used as standalone Bearer tokens, select Yes.
- Select Save Config.
Step 5: Enter the details and confirm
- Go back to the authorization screen on HexaSync.
- Enter your Store URL, for example
https://shop.example.com, and the Access Token you copied in Step 3. - Select Continue. HexaSync saves the store details and creates the credential. This can take a few seconds.
Step 6: Create the Magento 2 Connector
- When the Magento 2 card changes to Connected, select Create Magento 2 Connector.
- On the Enter Connector Name screen, the default name is [Store domain] Magento 2 Connector, for example
[shop.example.com] Magento 2 Connector. The Description is already filled in. - Select Continue to confirm. HexaSync shows Creating Connector… while it creates the Connector App; this can take a few minutes.
When it is done, the system takes you to the Magento 2 Connector App you just created.
Part 2: Re-authorize the connection in use
Re-authorize when the old Access Token can no longer be used, for example after someone selects Reauthorize on the HexaSync Integration in Magento 2, or when a task reports the error 401 Unauthorized. Update the Connector App that is in use; do not create a new Connector App just to fix a sign-in error.
Step 1: Open Settings in the Magento 2 Connector
- Open the matching Magento 2 Connector in Connector Apps, then select Settings.
Step 2: Select Re-authorize
- In Settings, find the Magento 2 credential and select Re-authorize.
Cannot use Re-authorize? Only the owner of the credential can re-authorize. Contact the person who created the Magento 2 connection.
Step 3: Get a new Access Token in Magento 2
- In the Magento 2 admin, open System › Extensions › Integrations.
- On the HexaSync row, select Reauthorize, then select Allow.
- Copy the new Access Token, then select Done.
Note: The old token stops working immediately, so continue with Step 4.
Step 4: Reconnect with the new Access Token
- Go back to the Re-authorize page on HexaSync and select Connect on the Magento 2 card.
- Select Use a different app, then select I will provide my Magento 2 integration. Do not select the old app in the list, because that app still holds the old token.
- Enter the Store URL exactly as you did the first time and the new Access Token, then select Continue.
- When the Magento 2 card shows Connected, you can close the page.
Note: You do not need to create a new Connector App. The existing Connector App uses the new token automatically.
Part 3: Check before you use the data
Open the Connector Apps list and select the Magento 2 Connector App you just created.
Check the credential
- In the Connector App you just created, go to Settings. The Magento 2 credential has the status Connected.
- The Store URL in the credential is the address of the store you want to connect.
Check the data
- Open the [Magento 2] Inventory Source Items task. The task retrieves the stock quantity of each SKU for each source in Magento 2 Multi-Source Inventory, every 15 minutes.
- Wait for the task to run, or run the task yourself. The check and the display of the results take place within 30 minutes.
- Compare a few sample records with Magento 2, for example the SKU, source and stock quantity.
- Check the number of SKUs and sources. If any are missing, check the Stores permission of the HexaSync Integration.
Note: HexaSync only reads product and inventory data and does not change anything in Magento 2. If you do not know which task to check, contact the Beehexa contact who supports your business.
Part 4: Common errors and how to fix them
| Message | How to fix |
|---|---|
| HexaSync Could Not Save Your Magento 2 Integration | Check that the Store URL starts with https:// and that the Access Token is the token shown after you select Activate. Select Fix my store details and try again and enter the details again. |
| We Couldn’t Finish Connecting Your Magento 2 Store | Select Choose another app, select I will provide my Magento 2 integration, then enter the Store URL and Access Token again. |
| 401 Unauthorized (reported by a task) | Check that Allow OAuth Access Tokens to be used as standalone Bearer tokens is Yes, and that the HexaSync Integration has the status Active. If someone has just selected Reauthorize in Magento 2, follow Part 2. |
| 403 Forbidden (reported by a task) | The store’s firewall is blocking HexaSync. Contact support@beehexa.com to get the list of HexaSync IP addresses and allow these addresses; see Before you start. |
| 404 Not Found (reported by a task) | The store has not turned on Magento 2 Multi-Source Inventory. Contact the store’s technical team. |
| The name already exists | Give the Connector App a different name. |
| Connector Quota Reached | Delete a Connector App you no longer use, or contact Beehexa to raise the quota. |
Part 5: Protect your details and stop the connection
- Enter the Access Token directly on the HexaSync authorization screen. Do not put the Access Token in chat groups, regular email or error screenshots.
- Hide sensitive data before you send screenshots to support.
To stop the connection:
- Ask Beehexa to turn off the schedules and disconnect in HexaSync.
- The Magento 2 administrator deletes the HexaSync Integration in System › Extensions › Integrations, or selects Reauthorize to invalidate the token in use.
Note: Turning off the schedules does not mean access has been revoked, and stopping the connection does not delete the data that has already been synced.
Part 6: Information to send Beehexa when you need support
- The company name, the Connector App name and the connection type: Magento 2.
- The Store URL, the step you were on, when the error happened and the error message.
- Recent changes to the Integration, Access Token, firewall or Magento 2 version.
Screenshots must hide the Access Token and sensitive data. Contact the Beehexa contact who supports your business, or support@beehexa.com. See also the Beehexa Privacy Policy and the Beehexa Support Policy.
Part 7: Frequently asked questions
What details does HexaSync use to connect to Magento 2?
HexaSync uses the Store URL of the store and the Access Token of an Integration named HexaSync that you create in System › Extensions › Integrations. It does not use the Consumer Key, Consumer Secret or Access Token Secret.
Why does Magento 2.4.4 or later reject the connection even though the Access Token is correct?
From Magento 2.4.4, you must turn on Allow OAuth Access Tokens to be used as standalone Bearer tokens in Stores › Settings › Configuration › Services › OAuth › Consumer Settings. If it is not turned on, Magento 2 rejects every request from HexaSync. See Step 4 in Part 1.
Do I need to create a new Connector App when the Access Token changes?
No. Re-authorize the Connector App that is in use with the new Access Token by following Part 2. The existing Connector App uses the new token automatically.
Does HexaSync write or change data on Magento 2?
No. The Magento 2 Connector App only reads product and inventory data and does not change anything in Magento 2.