Files
n8n/packages/nodes-base/credentials/ShopifyOAuth2Api.credentials.ts
alighasami 3d5eaf9445
Some checks failed
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
first commit
2026-03-17 16:22:57 +03:30

86 lines
1.9 KiB
TypeScript

import type { ICredentialType, INodeProperties } from 'n8n-workflow';
export class ShopifyOAuth2Api implements ICredentialType {
name = 'shopifyOAuth2Api';
extends = ['oAuth2Api'];
displayName = 'Shopify OAuth2 API';
documentationUrl = 'shopify';
properties: INodeProperties[] = [
{
displayName: 'Shop Subdomain',
name: 'shopSubdomain',
required: true,
type: 'string',
default: '',
description: 'Only the subdomain without .myshopify.com',
},
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'authorizationCode',
},
{
displayName: 'Client ID',
name: 'clientId',
type: 'string',
default: '',
required: true,
hint: 'Be aware that Shopify refers to the Client ID as API Key',
},
{
displayName: 'Client Secret',
name: 'clientSecret',
type: 'string',
typeOptions: {
password: true,
},
default: '',
required: true,
hint: 'Be aware that Shopify refers to the Client Secret as API Secret Key',
},
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'authorizationCode',
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden',
default: '=https://{{$self["shopSubdomain"]}}.myshopify.com/admin/oauth/authorize',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden',
default: '=https://{{$self["shopSubdomain"]}}.myshopify.com/admin/oauth/access_token',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
default: 'write_orders read_orders write_products read_products',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
default: 'access_mode=value',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
default: 'body',
},
];
}