How to create Oauth2 credentials for Shopify

How to create Oauth2 credentials for Shopify

In this guide, I’ll walk you through the complete process of setting up OAuth2 authentication flow for your Shopify app using Shopify’s Admin Dashboard. So let’s begin.

Setting up the Shopify App

Step 1: Create an Account on Shopify

You can skip this step if you already have an admin dashboard for Shopify. Navigate to shopify.com, and click “Start for Free”. Enter the details and verify your Email Address. Complete your profile setup.

Step 2: Access the App Development Dashboard

  1. Log in to your Shopify Admin Dashboard

  2. In the search bar, type “App Development” and select it. This will take you to the main app development page, where you can manage all your Shopify applications.

  3. On the development page, click “Build apps in Dev Dashboard”. This opens a dedicated development environment where you can create and configure your Shopify applications.

Step 3: Create Your First App Version

  1. In the development dashboard, click the “Create App” button in the top-right corner. You’ll be redirected to the app creation page

  2. Configure your Basic App Information

    1. App Name: Enter a descriptive name for your application

      1. For this example, we’ll use test-composio

    2. Click “Create” to proceed

    It’ll again redirect you to the version configuration page.

  3. Here, you can configure all your core settings:

    1. App URL: Paste your application's main URL.

    2. Scope Selections: Select the appropriate API scopes based on your needs. For most applications, you’ll need:

      1. Essential Scopes:

        • read_orders - Read order information

        • write_orders - Modify order data

        • read_products - Access product information

        • write_products - Modify product data

      2. Additional Scopes (select as needed):

        • read_customers - Access customer data

        • write_customers - Modify customer information

        • read_inventory - Read inventory levels

        • write_inventory - Update inventory

    3. Redirect URL: This is where Shopify sends users after they authorize your app: https://backend.composio.dev/api/v3/toolkits/auth/callback or the one provided by default in the config option on the Composio dashboard

    4. Click “Release” at the bottom of the page. In the modal that appears, include some optional data like Version Name and Version Message.

    5. Click “Release” to finalize

Retrieving OAuth Credentials

Step 4: Access OAuth Credentials

  1. Navigate to the Settings page from the left sidebar. This page contains your OAuth credentials

  2. You’ll find both the:

    1. Client ID: Your app’s unique identifier

    2. Client Secret: Your app’s secret key (keep this secure!)

    Copy both values - you’ll need them for your application configuration.

Configuring Authentication in Composio

Step 5: Configure OAuth Settings

  1. Navigate to your Composio Dashboard → Click “Create Auth Config” → Select Shopify from the available integrations.

  2. Choose “OAuth2” as the authentication method, and check “Use your own developer credentials”

  3. At the bottom, you’ll see a section for managing auth config with required fields like:

    1. Client ID: Paste the Client ID from your Shopify Dev Dashboard

    2. Client Secret: Paste the Client Secret from the Shopify Dev Dashboard

    3. Redirect URI: It must match exactly with your Shopify app configuration

  4. Finalize your Configuration: Click “Create Auth Config” to complete the setup. You’ll see a Config ID (format: ac_...) that you can use in your application code.

Step 6: Testing your OAuth Integration

  1. In Composio, click “Connect Account”, A modal will open for connection to initialize:

    1. External User ID: Enter any identifier (e.g., test-user-001)

    2. Store subdomain: Enter your Shopify store’s subdomain. If your store URL is https://je0xpi-12.myshopify.com, enter je0xpi-12

  2. Click “Connect Account”

  3. A new window will open for Shopify authorization. Install the app, and grant permissions.

  4. You’ll see the “Authentication Successful” message, close the window, and verify the connection where the user config shows “Active” status.


In this guide, I’ll walk you through the complete process of setting up OAuth2 authentication flow for your Shopify app using Shopify’s Admin Dashboard. So let’s begin.

Setting up the Shopify App

Step 1: Create an Account on Shopify

You can skip this step if you already have an admin dashboard for Shopify. Navigate to shopify.com, and click “Start for Free”. Enter the details and verify your Email Address. Complete your profile setup.

Step 2: Access the App Development Dashboard

  1. Log in to your Shopify Admin Dashboard

  2. In the search bar, type “App Development” and select it. This will take you to the main app development page, where you can manage all your Shopify applications.

  3. On the development page, click “Build apps in Dev Dashboard”. This opens a dedicated development environment where you can create and configure your Shopify applications.

Step 3: Create Your First App Version

  1. In the development dashboard, click the “Create App” button in the top-right corner. You’ll be redirected to the app creation page

  2. Configure your Basic App Information

    1. App Name: Enter a descriptive name for your application

      1. For this example, we’ll use test-composio

    2. Click “Create” to proceed

    It’ll again redirect you to the version configuration page.

  3. Here, you can configure all your core settings:

    1. App URL: Paste your application's main URL.

    2. Scope Selections: Select the appropriate API scopes based on your needs. For most applications, you’ll need:

      1. Essential Scopes:

        • read_orders - Read order information

        • write_orders - Modify order data

        • read_products - Access product information

        • write_products - Modify product data

      2. Additional Scopes (select as needed):

        • read_customers - Access customer data

        • write_customers - Modify customer information

        • read_inventory - Read inventory levels

        • write_inventory - Update inventory

    3. Redirect URL: This is where Shopify sends users after they authorize your app: https://backend.composio.dev/api/v3/toolkits/auth/callback or the one provided by default in the config option on the Composio dashboard

    4. Click “Release” at the bottom of the page. In the modal that appears, include some optional data like Version Name and Version Message.

    5. Click “Release” to finalize

Retrieving OAuth Credentials

Step 4: Access OAuth Credentials

  1. Navigate to the Settings page from the left sidebar. This page contains your OAuth credentials

  2. You’ll find both the:

    1. Client ID: Your app’s unique identifier

    2. Client Secret: Your app’s secret key (keep this secure!)

    Copy both values - you’ll need them for your application configuration.

Configuring Authentication in Composio

Step 5: Configure OAuth Settings

  1. Navigate to your Composio Dashboard → Click “Create Auth Config” → Select Shopify from the available integrations.

  2. Choose “OAuth2” as the authentication method, and check “Use your own developer credentials”

  3. At the bottom, you’ll see a section for managing auth config with required fields like:

    1. Client ID: Paste the Client ID from your Shopify Dev Dashboard

    2. Client Secret: Paste the Client Secret from the Shopify Dev Dashboard

    3. Redirect URI: It must match exactly with your Shopify app configuration

  4. Finalize your Configuration: Click “Create Auth Config” to complete the setup. You’ll see a Config ID (format: ac_...) that you can use in your application code.

Step 6: Testing your OAuth Integration

  1. In Composio, click “Connect Account”, A modal will open for connection to initialize:

    1. External User ID: Enter any identifier (e.g., test-user-001)

    2. Store subdomain: Enter your Shopify store’s subdomain. If your store URL is https://je0xpi-12.myshopify.com, enter je0xpi-12

  2. Click “Connect Account”

  3. A new window will open for Shopify authorization. Install the app, and grant permissions.

  4. You’ll see the “Authentication Successful” message, close the window, and verify the connection where the user config shows “Active” status.