# Magento 2: choose API resource access

Set **Resource Access** on the Magento integration to control which API resources Optiply can use. **Custom** lets you choose resources individually; **All** grants every resource and should not be the default response to a permission error.

## Before you choose Magento API resources

Identify the existing integration and confirm its stock route with Support: non-warehouse stock uses stock-status and stock-item information, while warehouse stock uses inventory source items. You need a Magento administrator who can edit that integration. Coordinate changes to an active connection before saving or reauthorizing it.

Use the [Magento setup guide](/article/magento-2-set-up-and-connection) for credentials and the Support handoff. Selecting API permissions does not itself create the Optiply connection.

## Steps to choose Magento API resources

1. In Magento Admin, go to **System → Extensions → Integrations** and edit the integration used for Optiply.
2. Open **API** in the left panel. Check the current **Resource Access** choice before changing it.
3. Choose **Custom** to select resources individually. Review the product, order, store and stock areas in the table below with Support for the routes your connection uses. Keep the warehouse and non-warehouse requirements separate.
4. Select the agreed resources and choose **Save**. If Magento asks you to confirm your identity, complete that confirmation in Magento.
5. If reauthorization is required, coordinate it with Support before choosing **Reauthorize** and approving the access. Save replacement credentials securely; an old connection cannot use a revoked token.
6. Ask Support to retry the affected product, order or stock request. Confirm the failing request now works rather than treating the saved permission screen as a successful data import.

Adobe's [integration instructions](https://experienceleague.adobe.com/en/docs/commerce-admin/systems/integrations) cover saving and reauthorizing integrations.

## Fields in Magento API resource access

| Resource or field | What it controls |
| --- | --- |
| **Resource Access: All** | Grants all available resources, not just the resources needed for Optiply. |
| **Resource Access: Custom** | Grants the resources selected in the tree. Review the selected scope before saving. |
| **Catalog → Inventory → Products** | Product-list access. Select the applicable product permissions for the connection. |
| **Catalog → Inventory** | The Inventory resource controls standard stock-item and `stockStatuses` read routes; selecting only a similarly named configuration section is not enough. |
| **Sales → Operations → Orders → Actions → View** | Order reading. It does not require every order-management action. |
| **Stores → Settings → All Stores** | Store configuration access used to identify store contexts when fetching products. |
| **Stores → Inventory → Sources** | Source-item access for warehouse stock. This is separate from non-warehouse stock-status access. |
| **Stores → Settings → Configuration → Inventory Section** | Inventory configuration permission. It is not the permission for the standard stock-status API endpoint. |

## What you see when choosing Magento API resources worked

The saved integration retains the selected resource scope. After any coordinated reauthorization, the connection can be checked against the affected requests. Check stock as well as products: successful product access alone does not confirm stock access.

## Limits of choosing Magento API resources

A custom scope must match the enabled routes and installed Magento modules; the table is not a complete minimum-permission recipe for every store. Resource access and authentication are separate. Broader permissions will not repair a revoked credential, an incompatible token route or a firewall block.

## If choosing Magento API resources did not work

For an access-denied response, identify whether products, orders, store information or stock failed, then review that resource area with Support. If the response is **unauthorized**, use the setup guide's authentication check rather than granting more resources. If warehouse stock is missing, check source-item access rather than changing only Inventory Section. Do not select **All**, enable anonymous access or repeatedly rotate credentials as a trial-and-error fix.

## Related articles on Magento connection and stock

- [Magento 2 setup and connection](/article/magento-2-set-up-and-connection)
- [Magento non-warehouse data mapping](/article/integrations-data-mappings-public-magento-non-warehouse-hotglue)
- [Magento warehouse data mapping](/article/integrations-data-mappings-public-magento-warehouse-hotglue)
