Magento is an open-source e-commerce platform that offers features such as order management, business intelligence, and shipping.
Magento 2 documentation: API guide, Authentication
Start establishing a connection to Magento 2 in either of the following ways:
-
From the Resources menu, select Connections. Then, click + Create connection at the top right.
– or –
-
While working in a new or existing integration, you can add an application to a flow simply by clicking Add source or Add destination/lookup.
In the resulting Application list, select Magento 2.
The Create connection panel opens with required and advanced settings.
At this point, you’re presented with options for providing Magento 2 authentication.
Name (required): Provide a clear and distinguishable name. Throughout integrator.io imports and exports, you will have the option to choose this new connection, and a unique identifier will prove helpful later when selecting among a list of connections that you’ve created.
Application (required, non-editable): A reminder of the app you’re editing.
Mode (required): Select one of the following options:
-
Cloud to connect to a publicly accessible server application
-
On-premise to connect to a server that is publicly inaccessible and has the integrator.io agent installed on it
Agent (required, if On-premise selected for Mode; otherwise not displayed): Select an agent from the list. To connect to an on-premise application, integrator.io requires that an agent be installed on a networked computer. An agent is a small application that allows you to connect to data behind your firewall. When installing an agent, you will specify a unique access token, which then populates the Agent drop-down list. The installed agents connect to integrator.io and establish a reverse SSH tunnel, allowing secure communication without the need to whitelist integrator.io IP addresses in your firewall settings. Multiple different connections can use a single agent.
Authentication type: Select Token as the authentication type for this connection (the OAuth 1.0 option is described separately).
Base URI (required): Enter the base URI of your Magento 2 account. You can locate this URL in the address bar after you sign in to your Magento 2 account. For example, if your account is located at http://123.12.12.1/xyz/admin, then replace admin with rest and enter the base URI as http://123.12.12.1/xyz/rest.
Username (required): Enter your Magento 2 username. How to retrieve the username:
Password (required): Enter your Magento 2 password. How to retrieve the password:
Multiple layers of protection, including AES 256 encryption, are in place to keep your password safe. When editing this connection, you must re-enter this value each time; it is stored only when the connection is saved and never displayed as text.
Generate token (required): Click Generate token to have integrator.io fill in an encrypted access token or enter the token generated for you by Magento 2.
Multiple layers of protection are in place, including AES 256 encryption, to keep your connection’s token safe. When editing this form later, you must generate this value again; it is stored only when the connection is saved and never displayed as text.
Note
Notes:
-
Errors while retrieving the token are often attributed to an incorrect base URI being used or your incorrect credentials. It's best to enter them in by hand and ensure that the browser autofill function doesn't override your activity.
-
For Magento accounts updated to 2.4.4 and above versions, the integration tokens can no longer be used for API bearer token authentication. To revert to the previous behavior, you should either disable two-factor authentication or run the bin/magento config:set oauth/consumer/enable_integration_as_bearer 1 command to restrict the new behavior. For more information, see Token-based authentication.
-
For Magento accounts using two-factor authentication, you have to enter the token in the Token field. How to retrieve the access token:
-
For Magento accounts using two-factor authentication, when you upgrade to a higher version, integrator.io doesn't get the connection up and running. This is because Magento is expecting a new token for a successful connection with integrator.io. To resolve this, create a token outside of integrator.io, enter the token when logging into Magento, and then enter the same token in the Token field. For more information on how to generate a token, see Token-based authentication .
-
Sign in to your Magento 2 account.
-
Navigate to System > Permissions > All users.
-
Click Add new user and enter all the required details.
-
From Account information, copy the Username.
-
Copy the Password.
-
Sign in to your Magento 2 account.
-
Navigate to System > Extensions > Integrations.
-
Navigate to Basic settings > API.
-
Select a suitable Resource access and click Save.
-
Navigate to Integration info > Add new integration.
-
Enter a suitable integration Name.
-
Enter the current password of the account and click Save.
-
Copy the Access token.
Before continuing, you have the opportunity to provide additional configuration information, if needed, for the Magento 2 connection.
Borrow concurrency from(optional): Select another connection from the list. By default, all data flowing through a connection record is submitted to the respective endpoint application at the Concurrency level configured for that connection record. There are cases, however, where multiple integrator.io connections need to share the same concurrency level, and this field allows you to specify which connection you would like to borrow from. With borrowed concurrency, the data flowing through both connections will be submitted to the endpoint application together, via a shared concurrency model.
Note
Selecting another connection from the drop-down list changes the form. The concurrency level will be hidden, set to the same shared value as the other connection’s.
Auto-recover rate limit errors: This setting is enabled by default with a pre-defined value for Target concurrency level. You can disable the setting if required. To set or make changes in any of these settings, you must have administrator or manage permissions.
Target concurrency level: This field is shown only if Auto-recover rate limit errors is enabled. Change the predefined value as required to limit the number of concurrent API requests allowed by the connection resource. See also, Setting currency level on a connection.
Concurrency level: When Auto-recover rate limit errors is enabled, the Concurrency level cannot be edited and shows the concurrency level that the platform is currently using (runtime). When Auto-recover rate limit errors is not enabled, enter a value to limit the number of concurrent API requests allowed by the connection resource. See also, Setting currency level on a connection.
Once you have configured the Magento 2 connection, you have a few options for continuing:
-
Save – click this button to test the connection, commit the new connection so that it will be available to all integrations for your account
-
Save & close – click to test and save the connection and exit the Create connection panel
-
Close – click to exit without saving any new changes
-
Test connection – click this button to verify that your new connection is free of errors
When you test or save the connection, it is verified before continuing.
The new connection is now successfully added to your account. It will be applied to the current source or destination app if you created it within a flow. Otherwise, you may proceed to register the connection with an integration.