Magento 2 Integration - Magento API Connection

In Magento 2, the API Credentials required for use of the Subscribe Pro extension are generated through the Integrations feature.

The required credentials are:

  • Consumer Key
  • Consumer Secret
  • Access Token
  • Access Token Secret

The steps below will show you how to generate these credentials.

Note: Your server must be publicly accessible or must whitelist the Subscribe Pro server IPs in order for Subscribe Pro to connect. You can find the IP addresses in the Subscribe Pro Merchant App Environment configuration under System > Payment Gateway Accounts > IP Addresses. We do not support connecting to servers that are protected by HTTP Authentication credentials.

Generating the Credentials

Step 1

Magento 2 API Credentials

In the Magento Admin backend, click on System. Under Extensions, click Integrations.

Step 2

Add New Integration

On the Integrations page, click on the button labeled Add New Integration.

Step 3

Configure New Integration

Enter a Name for the integration, your Email Address, and your Password.

Do not enter a Callback URL or Identity Link URL.

Then, click on the API tab.

Configure API Permissions

Select Custom from the Resource Access drop-down menu under the Available APIs heading.

Then, select the Sales checkbox, which should check all of the boxes within the Sales group, as well as the Carts > Manage Carts checkbox.

Next, click the button labeled Submit.

Activate the New Integration

Back on the Integrations page, find the integration you just created and click on the Activate link.

Confirm and Allow API Permissions

Click on the button labeled Allow to confirm the integration's access to the necessary resources.

You will see the four required credentials: Consumer Key, Consumer Secret, Access Token, and Access Token Secret.

Finish Activation of Integration

You may either copy them directly into Subscribe Pro now, or the next step will show how you can access the credentials at any time.

Then, click on the button labeled Done.

You can access the four credentials by going to the Integrations page, finding the integration used for the Subscribe Pro extension, clicking the Edit icon (on the far right), and then scrolling to the bottom of the page.

Access the Integration Credentials Any Time

In the Subscribe Pro Merchant App

In Subscribe Pro, go to System > Configuration and click on the Store Connection Settings tab.

Store Connection Settings

Under E-commerce Platform Connection Type select Magento 2 REST API.

Ecommerce Platform Connection Type

Under the Magento 2 REST Connection heading, set M2 REST API Base URL to the base URL of your Magento 2 store. The trailing forward slash ( / ) is necessary.

M2 Rest API Base URL

Enter the four credentials you created in the previous steps into their corresponding fields, and save the configuration page. You can click Verify to ensure that the connection is working and the credentials were entered correctly.

Set the Credentials in Subscribe Pro

If you have completed all of the above steps and are still having trouble connecting to your Magento store from your Subscribe Pro environment, please review our troubleshooting steps.