How to Get Magento 2 API Keys? – Step-by-step Guide
Magento’s robust platform provides seamless integration with a variety of tools and services through its REST APIs. You can access the platform by creating an integration and getting the credentials.
This guide will walk you through a step-by-step guide to get your Magento 2 API keys, simplifying the path to enhanced connectivity and functionality for your online store.
Table of Contents
What are Magento 2 API Keys?
The Magento 2 API keys are unique identifiers used to authenticate external applications and services to interact with Magento 2.
They include the following:
- Consumer Key
- Consumer Secret
- Access Token
- Access Token Secret
They are useful to integrate third-party applications or services with Magento 2. By using the Magento 2 API credentials, you can extend the platform’s capabilities, enhance user experience, and streamline operations.
Remember, the Magento 2 API keys are not the same as authentication tokens. However, they both serve the same purpose. You can obtain admin or customer access tokens by passing credentials (like username and password) using the respective endpoints.
Learn more:
How to Get API Keys in Magento 2?
Getting API keys in Magento 2 involves creating and configuring an integration in the Magento 2 Admin panel.
Here are the steps on Magento 2 get API Keys:
Log in to your ‘Magento 2 Admin Panel’ and go to ‘System’> ‘Extensions’ > ‘Integrations.’
Click the ‘Add New Integration’ button.
Enter the following details for the integration:
- Name: Enter a descriptive name for the integration. This helps in identifying the integration purpose.
- Email: Provide a contact email address for the integration.
- Callback URL: Enter the URL to which OAuth credentials will be sent when using OAuth for token exchange. It’s advisable to use a secure URL (e.g., https://.)
- Identity Link URL: Specify the URL where users will be redirected to link their third-party account with these Magento 2 integration credentials.
- Your Password: Enter your current admin password. It is required to confirm your identity and authorize the integration.
On the left panel, click the API tab.
And grant access to required resources for the integration.
Click ‘Save’ to create the integration.
Return to the ‘Integrations’ grid. Find your new integration and click the ‘Activate’ link next to it.
Confirmation screen showing the list of resources you have allowed for this integration.
Review the resources and permissions, then click ‘Allow.’
The following integration tokens will be displayed on the screen: Consumer Key, Consumer Secret, Access Token, and Access Token Secret.
These are essential for your API connectivity, so safely store this information.
Your integration is complete, and the API keys (tokens) is ready to connect external applications to your Magento 2 store.
Remember to keep your API key secure and only share it with trusted applications and services. Regularly reviewing and managing your integrations ensures the security and efficiency of your Magento 2 store.
Magento 2 API Learning Resource
Remember, the Magento ecosystem is vast and continually evolving, so staying updated and engaged with the community is key to mastering the Magento 2 API.
Continue your Magento 2 API learning journey through our dedicated resources. You can explore detailed tutorials on using various in-built APIs and also modules for custom ones. Explore more at Magento 2 API by Meetanshi.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
8 Best Shopify Apps to Cross Sell [Increase Revenue]
4 Best Shopify Auto Post Apps [Efficient Way]
Next