This guide will show you how to connect your Shopee store to API2Cart in just a few steps.

Step 1: Create an App

To add a Shopee store, you need to register a developer account at .

After registration and account approval, go to App Management > App List and create an app with the type ERP System.

How to connect Shopee to API2Cart

In the Test Redirect URL Domain field, enter the redirect URL for the app OAuth authorization.

After successful app creation, you will receive a partner ID and API Partner Key. These are used for testing in the sandbox environment only.

To authorize the app, you need to generate an authorization link. Detailed instructions can be found here. Below is an example in PHP:

expand source

When visiting the generated link, an authorization window will open.

How to connect Shopee to API2Cart

After logging in, the user will be asked to authorize the app.

How to connect Shopee to API2Cart

⚠️ Note: App authorization is valid for 365 days. After expiration, the seller must reauthorize the app.

For apps in Developing status, you can authorize a test store in the API Test Tool section.

How to connect Shopee to API2Cart

After authorization confirmation, you will receive a code and shop_id on your redirect URL. These are used to obtain the refresh_token.

Example of obtaining a refresh_token in PHP:

expand source

Step 2: Connect via API2Cart

After obtaining the refresh_token, the Shopee store can be added to API2Cart.

How to connect Shopee to API2Cart

Required parameters:

  • shopee_partner_id – Partner ID of your registered app
  • shopee_partner_key – API partner key of your registered app
  • shopee_shop_id – Shopee store's shop id
  • shopee_refresh_token – Refresh token received after app authorization
  • shopee_region (optional) – Region of the store (possible values: BR, CN)
  • shopee_environment (optional) – Environment (possible values: sandbox, production)