Have questions? Leave your message here or Schedule a quick call with our manager now

How to Connect Wix to API2Cart?

To integrate with Wix, you need to have a Wix developer account https://dev.wix.com/.

1. First of all, you need to create your own application.

Specify Redirect URL and App URL.

On this page, you should copy App ID and Secret Key which will be needed in the next steps.

You also need to select the necessary permissions. The minimum required permissions to add a store to API2Cart are full access to Wix Stores -> Read Stores, Wix Developers -> Manage Your App and Business Info -> Manage Consent Policy.

It is worth giving full access here. If you change permissions later, you will have to re-add the application to the store.

2. Next, you need to add an application to the store.

Here you should select added store or add the new one.


Next, the window opens with a page you specified in the App URL. You need to copy the token from the URL.

3. Here you form the URL for installing the application. Note: You need to obtain approval from the Wix and list of your application on the Wix Marketplace.

    https://www.wix.com/installer/install?code=<code>&appId=<app_id>&redirectUrl=<redirect_url></redirect_url>
    

code is the token that you copied in the previous step.

After that, you should follow this URL in a browser and click Add to Site.

Next, there will be a redirect to redirectUrl, where you need to take the code from the URL.

4. After that you need to make the following request:

curl -X POST \
  https://www.wixapis.com/oauth/access \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "authorization_code",
    "client_id": <APP_ID>,
    "client_secret": <APP_SECRET>,
    "code": <AUTH_CODE>
}'

As a result, you get refresh_token.

5. In order to add a store to API2Cart you need to specify the following fields:

Posted in: Getting Started