Magento 2 API: Get Admin Token

To authenticate the API, we can pass the admin token, customer token, or integration token along with the API request in Magento 2. This type of authentication process is called Token-based authentication. Introduction to Magento 2 API and different types of API authentication mechanism used in Magento 2 are present in my previous article. In … Read more

Magento 2: Add Local & External CSS and JS file

This article shows different ways to add CSS and JS files in Magento 2. Add CSS & JS from Layout XML file In this example, we are adding JS and CSS via layout file in your custom module. app/code/YourCompany/YourModule/ view/frontend/layout/frontName_controllerName_actionName.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <!– local CSS file –> <css src="YourCompany_YourModule::css/custom.css"/> <!– local … Read more