Implementing simple Magento 2 integrations requires little knowledge of PHP or Magento internal processes (learn more about PHP and Magento internal processes here). So this article will provide you with all fundamental knowledge that helps you get used to Magento 2 integrations.
What is Magento 2 integration?
Magento 2 integrations allow mediator services to call the Magento web APIs which currently support different processes like Accounting, Enterprise Resource Planning (ERP), Customer Relationship Management (CRM), Product Information Management (PIM), and marketing automation systems out of the box.
What are the Magento Web APIs?
The Magento web API is a framework in which integrators and developers are given the instrument so that they can use web services that communicate with the Magento system.
Magento web API consists of 7 major features:
- In both Magento 1 and Magento 2, the web API supports for Representational State Transfer and Simple Object Access Protocol.
- There are three types of authentication:
- Third-party extensions are authenticated by OAuth 1.0a.
- Mobile applications are authenticated by tokens.
- Admins and guests are authenticated by login identification.
- All Magento 2 integrations and accounts are enabled to access to a certain resource. The API framework checks that any call has the authorization to perform the request.
- With a few lines of XML, every Magento or third-party service can be configured as a web API. So you need to define XML elements and features in a configuration file called webapi.xml to configure a web API.
- The CRUD (create, read, update, delete) & search model are the bases of this framework.
- The framework assists in the field filtering of web API responses to conserve mobile bandwidth.
- To obtain more efficient Magento 2 integrations, integration style web APIs can operate multiple services in a single web API at the same time.
There are three key steps in the onboarding workflow:
- Authorize the integration – Get into the system screen, search for the relevant integration, then get authorization.
- Verify and establish login – When prompted, accept the requested access. If redirected to a third-party, log in to the system, or create a new account. Before returning to the integration page, you need to login successfully.
- Receive confirmation of authorized integration – The integration process is confirmed successfully authorized. No need to call for access or request tokens as you set up Magento integrations and receive the credentials.
Add a new integration
To put in new Magento 2 integrations, you need to follow these steps:
- On the Admin sidebar, go to System > Extensions > Integrations.
- Import the following Magento integrations Info:
- The integration Name and the contact Email.
- The Callback URL where OAuth credentials can be sent when using OAuth for token exchange.
- The Identity Link URL to redirect the users to a third-party account with these Magento integration credentials.
3. In the left panel, select API and do the following:
- Set Resource Access to All or Custom
- For custom access, choose the checkbox of each necessary resource.
4. Click Save to finish.
In this article, we just give some of the basic steps to familiarize you with Magento integrations. We hope that this information above may be helpful for store owners in learning more about Magento in general and Magento 2 integrations in particular.