cancel
Showing results for 
Search instead for 
Did you mean: 

Resource access issue for an Integration of custom module

Resource access issue for an Integration of custom module

I am using Magento 2.4.5 
I created an Integration for my custom module. I am successful in generating the oauth_token & oauth_token_secret. But when I want to see an order using API, I get a 401 error. 
API endpoint:

http://dev.magento.com/rest/V1/orders/5

API response:

{
    "message": "The consumer isn't authorized to access %resources.",
        "parameters": {
            "resources": "Magento_Sales::actions_view"
        },
}

My etc/integration/api.xml & etc/integration/acl.xml is:

<integrations>
    <integration name="TestMagentoIntegration">
        <resources>

            <resource name="Magento_Customer::customer" />
            <resource name="Magento_Log::online" />

            <resource name="Magento_Sales::sales" />
            <resource name="Magento_Sales::sales_operation" />
            <resource name="Magento_Sales::sales_order" />
            <resource name="Magento_Sales::actions" />
            <resource name="Magento_Sales::create" />
            <resource name="Magento_Sales::actions_view" />
            <resource name="Magento_Sales::actions_edit" />

            <resource name="Magento_Catalog::catalog" />
            <resource name="Magento_Catalog::catalog_inventory" />
            <resource name="Magento_Catalog::products" />

            <resource name="Magento_Backend::stores" />
            <resource name="Magento_Backend::stores_settings" />
            <resource name="Magento_Config::config" />
            <resource name="Magento_Cms::config_cms" />
            <resource name="Magento_Catalog::config_catalog" />
            <resource name="Magento_CatalogSearch::config_catalog_search" />
            <resource name="Magento_CatalogInventory::cataloginventory" />
            <resource name="Magento_Sales::order_statuses" />

            <resource name="Magento_InventoryApi::inventory" />
            <resource name="Magento_InventoryApi::source" />
            <resource name="Magento_InventoryApi::source_edit" />
            <resource name="Magento_InventoryApi::ship_source_selection" />
            <resource name="Magento_InventoryApi::stock" />
            <resource name="Magento_InventoryApi::stock_edit" />
            <resource name="Magento_InventoryApi::stock_delete" />
            <resource name="Magento_InventorySalesApi::stock" />
            <resource name="Magento_CurrencySymbol::system_currency" />

            <resource name="Magento_Backend::stores_attributes" />
            <resource name="Magento_Catalog::attributes_attributes" />
            <resource name="Magento_Catalog::attributes_attributes" />
            <resource name="Magento_Catalog::sets" />
            <resource name="Magento_Backend::system" />
            <resource name="Magento_AdobeStockAsset::adobe_stock_asset" />
            <resource name="Magento_AdobeStockAsset::actions" />
            <resource name="Magento_AdobeStockAsset::actions_delete" />
            <resource name="Magento_AdobeStockAsset::actions_save" />
            <resource name="Magento_AdobeStockAsset::actions_view" />
            <resource name="Magento_AdobeStockAsset::actions_get" />
        </resources>
    </integration>
</integrations>

Can anyone help me to get the order data properly?

 

3 REPLIES 3

Re: Resource access issue for an Integration of custom module

I really think I cannot develop any module by myself. I believe that everybody must do their own business. So if you are good at programming, right. If now, then just go and find someone who is.

Re: Resource access issue for an Integration of custom module

@crypticnendb3e brother, I am trying to learn. I am just stuck in this specific part.

Re: Resource access issue for an Integration of custom module

I think that you think in the right direction. However, before even starting any substantial project you must think that you might now have sufficient human resources. Are you ready to stop and lose all your money. I hope not. And web development services are what will help you to finish your projects and achieve your dream. Like they helped my own company.