I have installed fresh magento 2 and when I hit API of anything it doesn't work for me.

Check this url : visit here

It seems like an permission issue and I can't figure out what? If anyone having knows about this, please let me know.



<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> 
  <router id="standard"> <route id="mobileapp" frontName="mobileapp"> 
  <module name="Vendor_App" /> 
  </route> </router> 


<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route method="POST" url="/V1/signin/">
    <service class="Vendor\App\Api\LoginManagementInterface" method="setSignin"/>
        <resource ref="anonymous" />
  • which API you want to access ? – Kishan Patadia Apr 29 '19 at 6:27
  • If I rename mywebapi xml then it shows as 404 and am accessing custom api – Prathap Gunasekaran Apr 29 '19 at 6:41
  • 1
    @Aaditya updated – Prathap Gunasekaran Apr 29 '19 at 7:32
  • 1
    <preference for="Commerceshop\MobileApp\Api\LoginManagementInterface" type="Commerceshop\MobileApp\Model\LoginManagement"/> – Aditya Shah Apr 29 '19 at 7:41
  • 1
    It there already mate @Aaditya – Prathap Gunasekaran Apr 29 '19 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.