{"id":3114,"date":"2023-11-24T07:30:03","date_gmt":"2023-11-24T07:30:03","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/magento-2-api-key\/"},"modified":"2025-01-15T04:33:16","modified_gmt":"2025-01-15T04:33:16","slug":"magento-2-api-key","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/magento-2-api-key\/","title":{"rendered":"How to Get Magento 2 API Keys? &#8211; Step-by-step Guide"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento\u2019s 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Integrate Payment Gateway, CRM, ERP, or any third-party services with Magento. Learn more about our&nbsp;<a href=\"https:\/\/meetanshi.com\/magento-api-integration-service.html\" target=\"_blank\" rel=\"noreferrer noopener\">Magento API integration services<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-magento-api-keys\">What are Magento 2 API Keys?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Magento 2 API keys are unique identifiers used to authenticate external applications and services to interact with Magento 2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They include the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Consumer Key<\/li>\n\n\n\n<li>Consumer Secret<\/li>\n\n\n\n<li>Access Token<\/li>\n\n\n\n<li>Access Token Secret<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">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\u2019s capabilities, enhance user experience, and streamline operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Learn more:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/meetanshi.com\/blog\/magento-2-api-get-admin-token\/\">How to Get Admin Token in Magento 2<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/meetanshi.com\/blog\/magento-2-api-get-customer-token\/\">How to Get Customer Token in Magento 2<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-get-api-keys-in-magento-\">How to Get API Keys in Magento 2?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Getting API keys in Magento 2 involves creating and configuring an integration in the Magento 2 Admin panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps on Magento 2 get API Keys:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Log in to your \u2018<strong>Magento 2 Admin Panel\u2019<\/strong>&nbsp;and go to&nbsp;<strong>\u2018System\u2019<\/strong>&gt;&nbsp;<strong>\u2018Extensions\u2019&nbsp;<\/strong>&gt;&nbsp;<strong>\u2018Integrations<\/strong>.\u2019<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/11\/1-go-to-magento-2-integrations-1.png\" alt=\"Get Magento API Keys from integration\" class=\"wp-image-39790\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Click the \u2018<strong>Add New Integration<\/strong>\u2019 button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/11\/2-add-new-magento-2-integration.png\" alt=\"Add new magento 2 integration\" class=\"wp-image-39789\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Enter the following details for the integration:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Name:<\/strong>&nbsp;Enter a descriptive name for the integration. This helps in identifying the integration purpose.<\/li>\n\n\n\n<li><strong>Email:&nbsp;<\/strong>Provide a contact email address for the integration.<\/li>\n\n\n\n<li><strong>Callback URL:<\/strong>&nbsp;Enter the URL to which OAuth credentials will be sent when using OAuth for token exchange. It\u2019s advisable to use a secure URL (e.g., https:\/\/.)<\/li>\n\n\n\n<li><strong>Identity Link URL:&nbsp;<\/strong>Specify the URL where users will be redirected to link their third-party account with these Magento 2 integration credentials.<\/li>\n\n\n\n<li><strong>Your Password:&nbsp;<\/strong>Enter your current admin password. It is required to confirm your identity and authorize the integration.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">On the left panel, click the&nbsp;<strong>API tab<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/11\/3-get-magento-2-api-key.png\" alt=\"Get Magento 2 API key\" class=\"wp-image-39788\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">And grant access to required resources for the integration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click&nbsp;<strong>\u2018Save\u2019<\/strong>&nbsp;to create the integration.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/11\/4-set-magento-2-api-permissions.png\" alt=\"Set magento 2 api permissions\" class=\"wp-image-39787\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Return to the \u2018<strong>Integrations<\/strong>\u2019 grid. Find your new integration and click the \u2018<strong>Activate<\/strong>\u2019 link next to it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/11\/5-activate-magento-2-integration.png\" alt=\"Activate Magento 2 integration\" class=\"wp-image-39783\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Confirmation screen showing the list of resources you have allowed for this integration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Review the resources and permissions, then click \u2018<strong>Allow<\/strong>.\u2019<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/11\/6-allow-magento-2-integration.png\" alt=\"Allow Magento 2 integration\" class=\"wp-image-39785\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The following integration tokens will be displayed on the screen: Consumer Key, Consumer Secret, Access Token, and Access Token Secret.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These are essential for your API connectivity, so safely store this information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Your integration is complete, and the API keys<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/11\/7-magento-2-api-keys.png\" alt=\"Get Magento 2 API Keys\" class=\"wp-image-39786\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">(tokens) is ready to connect external applications to your Magento 2 store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"magento-api-learning-resource\">Magento 2 API Learning Resource<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Explore more at\u00a0<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-api\/\">Magento 2 API by Meetanshi<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento\u2019s robust platform provides seamless integration with a variety of tools and services through its REST APIs. You can access the platform by creating an&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-3114","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=3114"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3114\/revisions"}],"predecessor-version":[{"id":5769,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3114\/revisions\/5769"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=3114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=3114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=3114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}