Articles in this section

Authorize Magento 2 integration app connection using token-based authentication

Magento has restricted API access if two-factor authentication (2FA) is enabled in your Magento 2 account. That becomes a problem if you have already configured your Magento 2 connection using 2FA to access the Magento Admin from additional devices. Then, if you try to authorize a Magento 2 connection in the Integration App, you will get the error “Please use the 2Fa provider-specific endpoints to obtain a token.” To avoid this error, you must re-authorize your connection with a manually generated token.

Note: Only an admin can authenticate a 2FA Magento 2 connection.

Create integration in Magento 2 account to generate an access token

IMPORTANT: For Magento accounts updated to 2.4.4 and above versions, the integration tokens can no longer be used for API bearer token authentication. To revert to the previous behavior, you should either disable two-factor authentication or run the bin/magento config:set oauth/consumer/enable_integration_as_bearer 1 command to restrict the new behavior. For more information, see Token-based authentication.

If 2FA is enabled in your Magento 2 account, you can configure your Integration App connection, as follows:

  1. Sign in to your Magento 2 account as an administrator.
  2. Enter the password for the correct authentication app.
  3. From the left menu, click System > Extensions > Integrations.
  4. Click Add new integration.
    Add_new_integration.jpg
  5. Below the General section enter Name, Email (optional), and Password.
  6. In the left menu, click API.
  7. From the Resource Access drop-down menu, select All.
    Resources.jpg
    Note: If you chose Custom, you can’t change the resources once the integration is created.
  8. Click Save.
  9. On the Integrations page, next to the newly created integration, click Activate.
    Activate_integration.jpg
  10. On the Integration page, you can find the list of the resources, click Allow.
  11. The Integration Token Details are generated.
    Integration_Token_Details.jpg
  12. Click Done.
    Important: The token expires only if you click Reauthorize on the Integration page, next to your integration in your M2 account, or delete the integration.

Configure your Magento 2 connection in the integration app

  1. Sign in to your integrator.io account.
  2. Click to open the Magento 2 - NetSuite Integration App.
  3. Go to Connections.
  4. Next to the Magento 2 connection, from the Actions menu, select Edit connection.
  5. In the Token field, enter the Access Token field value generated in the Magento account.
    Note: When you enter the value in the Token field, the username and password fields become optional.
  6. Click Save & close.

For more information, see Install the Magento 2 - NetSuite Integration App.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.