@xnkee/n8n-nodes-instagram 0.0.0-stage → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +178 -2
  3. package/dist/credentials/InstagramApi.credentials.d.ts +10 -0
  4. package/dist/credentials/InstagramApi.credentials.js +55 -0
  5. package/dist/credentials/InstagramApi.credentials.js.map +1 -0
  6. package/dist/credentials/InstagramOAuth2Api.credentials.d.ts +10 -0
  7. package/dist/credentials/InstagramOAuth2Api.credentials.js +93 -0
  8. package/dist/credentials/InstagramOAuth2Api.credentials.js.map +1 -0
  9. package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.d.ts +17 -0
  10. package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.js +116 -0
  11. package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.js.map +1 -0
  12. package/dist/credentials/instagram.svg +1 -0
  13. package/dist/index.d.ts +4 -0
  14. package/dist/index.js +21 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/nodes/Instagram/GenericFunctions.d.ts +28 -0
  17. package/dist/nodes/Instagram/GenericFunctions.js +231 -0
  18. package/dist/nodes/Instagram/GenericFunctions.js.map +1 -0
  19. package/dist/nodes/Instagram/Instagram.node.d.ts +5 -0
  20. package/dist/nodes/Instagram/Instagram.node.js +187 -0
  21. package/dist/nodes/Instagram/Instagram.node.js.map +1 -0
  22. package/dist/nodes/Instagram/Instagram.node.json +17 -0
  23. package/dist/nodes/Instagram/descriptions/comment/Comment.fields.d.ts +2 -0
  24. package/dist/nodes/Instagram/descriptions/comment/Comment.fields.js +161 -0
  25. package/dist/nodes/Instagram/descriptions/comment/Comment.fields.js.map +1 -0
  26. package/dist/nodes/Instagram/descriptions/comment/Comment.operations.d.ts +2 -0
  27. package/dist/nodes/Instagram/descriptions/comment/Comment.operations.js +62 -0
  28. package/dist/nodes/Instagram/descriptions/comment/Comment.operations.js.map +1 -0
  29. package/dist/nodes/Instagram/descriptions/comment/index.d.ts +2 -0
  30. package/dist/nodes/Instagram/descriptions/comment/index.js +8 -0
  31. package/dist/nodes/Instagram/descriptions/comment/index.js.map +1 -0
  32. package/dist/nodes/Instagram/descriptions/custom/Custom.fields.d.ts +2 -0
  33. package/dist/nodes/Instagram/descriptions/custom/Custom.fields.js +65 -0
  34. package/dist/nodes/Instagram/descriptions/custom/Custom.fields.js.map +1 -0
  35. package/dist/nodes/Instagram/descriptions/custom/Custom.operations.d.ts +2 -0
  36. package/dist/nodes/Instagram/descriptions/custom/Custom.operations.js +26 -0
  37. package/dist/nodes/Instagram/descriptions/custom/Custom.operations.js.map +1 -0
  38. package/dist/nodes/Instagram/descriptions/custom/index.d.ts +2 -0
  39. package/dist/nodes/Instagram/descriptions/custom/index.js +8 -0
  40. package/dist/nodes/Instagram/descriptions/custom/index.js.map +1 -0
  41. package/dist/nodes/Instagram/descriptions/index.d.ts +7 -0
  42. package/dist/nodes/Instagram/descriptions/index.js +24 -0
  43. package/dist/nodes/Instagram/descriptions/index.js.map +1 -0
  44. package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.d.ts +2 -0
  45. package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.js +164 -0
  46. package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.js.map +1 -0
  47. package/dist/nodes/Instagram/descriptions/insight/Insight.operations.d.ts +2 -0
  48. package/dist/nodes/Instagram/descriptions/insight/Insight.operations.js +32 -0
  49. package/dist/nodes/Instagram/descriptions/insight/Insight.operations.js.map +1 -0
  50. package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.d.ts +2 -0
  51. package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.js +87 -0
  52. package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.js.map +1 -0
  53. package/dist/nodes/Instagram/descriptions/insight/index.d.ts +4 -0
  54. package/dist/nodes/Instagram/descriptions/insight/index.js +12 -0
  55. package/dist/nodes/Instagram/descriptions/insight/index.js.map +1 -0
  56. package/dist/nodes/Instagram/descriptions/media/Media.operations.d.ts +2 -0
  57. package/dist/nodes/Instagram/descriptions/media/Media.operations.js +62 -0
  58. package/dist/nodes/Instagram/descriptions/media/Media.operations.js.map +1 -0
  59. package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.d.ts +2 -0
  60. package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.js +163 -0
  61. package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.js.map +1 -0
  62. package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.d.ts +2 -0
  63. package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.js +285 -0
  64. package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.js.map +1 -0
  65. package/dist/nodes/Instagram/descriptions/media/index.d.ts +4 -0
  66. package/dist/nodes/Instagram/descriptions/media/index.js +12 -0
  67. package/dist/nodes/Instagram/descriptions/media/index.js.map +1 -0
  68. package/dist/nodes/Instagram/descriptions/mention/Mention.fields.d.ts +2 -0
  69. package/dist/nodes/Instagram/descriptions/mention/Mention.fields.js +122 -0
  70. package/dist/nodes/Instagram/descriptions/mention/Mention.fields.js.map +1 -0
  71. package/dist/nodes/Instagram/descriptions/mention/Mention.operations.d.ts +2 -0
  72. package/dist/nodes/Instagram/descriptions/mention/Mention.operations.js +38 -0
  73. package/dist/nodes/Instagram/descriptions/mention/Mention.operations.js.map +1 -0
  74. package/dist/nodes/Instagram/descriptions/mention/index.d.ts +2 -0
  75. package/dist/nodes/Instagram/descriptions/mention/index.js +8 -0
  76. package/dist/nodes/Instagram/descriptions/mention/index.js.map +1 -0
  77. package/dist/nodes/Instagram/descriptions/message/Message.fields.d.ts +2 -0
  78. package/dist/nodes/Instagram/descriptions/message/Message.fields.js +123 -0
  79. package/dist/nodes/Instagram/descriptions/message/Message.fields.js.map +1 -0
  80. package/dist/nodes/Instagram/descriptions/message/Message.operations.d.ts +2 -0
  81. package/dist/nodes/Instagram/descriptions/message/Message.operations.js +44 -0
  82. package/dist/nodes/Instagram/descriptions/message/Message.operations.js.map +1 -0
  83. package/dist/nodes/Instagram/descriptions/message/index.d.ts +2 -0
  84. package/dist/nodes/Instagram/descriptions/message/index.js +8 -0
  85. package/dist/nodes/Instagram/descriptions/message/index.js.map +1 -0
  86. package/dist/nodes/Instagram/descriptions/user/User.operations.d.ts +2 -0
  87. package/dist/nodes/Instagram/descriptions/user/User.operations.js +38 -0
  88. package/dist/nodes/Instagram/descriptions/user/User.operations.js.map +1 -0
  89. package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.d.ts +2 -0
  90. package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.js +164 -0
  91. package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.js.map +1 -0
  92. package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.d.ts +2 -0
  93. package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.js +83 -0
  94. package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.js.map +1 -0
  95. package/dist/nodes/Instagram/descriptions/user/index.d.ts +4 -0
  96. package/dist/nodes/Instagram/descriptions/user/index.js +12 -0
  97. package/dist/nodes/Instagram/descriptions/user/index.js.map +1 -0
  98. package/dist/nodes/Instagram/handlers/CommentHandler.d.ts +2 -0
  99. package/dist/nodes/Instagram/handlers/CommentHandler.js +63 -0
  100. package/dist/nodes/Instagram/handlers/CommentHandler.js.map +1 -0
  101. package/dist/nodes/Instagram/handlers/CustomHandler.d.ts +2 -0
  102. package/dist/nodes/Instagram/handlers/CustomHandler.js +28 -0
  103. package/dist/nodes/Instagram/handlers/CustomHandler.js.map +1 -0
  104. package/dist/nodes/Instagram/handlers/InsightHandler.d.ts +2 -0
  105. package/dist/nodes/Instagram/handlers/InsightHandler.js +42 -0
  106. package/dist/nodes/Instagram/handlers/InsightHandler.js.map +1 -0
  107. package/dist/nodes/Instagram/handlers/MediaHandler.d.ts +2 -0
  108. package/dist/nodes/Instagram/handlers/MediaHandler.js +172 -0
  109. package/dist/nodes/Instagram/handlers/MediaHandler.js.map +1 -0
  110. package/dist/nodes/Instagram/handlers/MentionHandler.d.ts +2 -0
  111. package/dist/nodes/Instagram/handlers/MentionHandler.js +48 -0
  112. package/dist/nodes/Instagram/handlers/MentionHandler.js.map +1 -0
  113. package/dist/nodes/Instagram/handlers/MessageHandler.d.ts +2 -0
  114. package/dist/nodes/Instagram/handlers/MessageHandler.js +57 -0
  115. package/dist/nodes/Instagram/handlers/MessageHandler.js.map +1 -0
  116. package/dist/nodes/Instagram/handlers/UserHandler.d.ts +2 -0
  117. package/dist/nodes/Instagram/handlers/UserHandler.js +48 -0
  118. package/dist/nodes/Instagram/handlers/UserHandler.js.map +1 -0
  119. package/dist/nodes/Instagram/instagram.svg +1 -0
  120. package/package.json +61 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,179 @@
1
- # Temporary Holding Version
1
+ # @xnkee/n8n-nodes-instagram
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm version](https://badge.fury.io/js/@xnkee%2Fn8n-nodes-instagram.svg)](https://badge.fury.io/js/@xnkee%2Fn8n-nodes-instagram)
4
+ [![Documentation](https://img.shields.io/badge/docs-Website-blue)](https://instagram-n8n-node.rizkifirmansyah.com/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ An official community node for **n8n** that integrates with **Instagram API with Instagram Login** (Business Login for Instagram) powered by Meta Graph API `v26.0`.
8
+
9
+ 📖 **Official Documentation**: https://instagram-n8n-node.rizkifirmansyah.com/
10
+
11
+ This node enables automated interactions with Instagram Professional accounts (Business & Creator) directly via Instagram Login, **without requiring the account to be connected to a Facebook Page**.
12
+
13
+ ---
14
+
15
+ ## 🌟 Key Features
16
+
17
+ - **🔐 Three Authentication Methods**:
18
+ - **OAuth2 (Instagram Business Login)**: Standard Meta OAuth 2.0 authorization flow.
19
+ - **Access Token (Direct / Long-Lived Token)**: Direct token-based authentication (supporting 60-day long-lived tokens).
20
+ - **Unified Login (Instagram or Facebook Login)**: Instagram API with Unified Login via a login configuration (`config_id`), calling `graph.facebook.com` with a Business Integration System User Access Token.
21
+ - **👤 User & Profile**:
22
+ - Retrieve authenticated user profile (`/me`) or look up other accounts (`biography`, `followers_count`, `media_count`, `website`, etc.).
23
+ - Retrieve user-level account insights.
24
+ - **📸 Media & Publishing**:
25
+ - **Single Photo**: Publish images to the feed.
26
+ - **Video & Reels**: Publish video posts and Instagram Reels with automatic asynchronous container status polling until ready (`FINISHED`).
27
+ - **Carousel**: Multi-item carousel posts (mixed photos and videos, 2–10 items).
28
+ - **Story**: Publish photos or videos as Instagram Stories.
29
+ - **Get & Delete**: Retrieve detailed media metadata or delete posts.
30
+ - **💬 Comment Moderation & Management**:
31
+ - Retrieve comments and replies for any media post.
32
+ - Post top-level comments and reply directly to existing comments.
33
+ - Moderation: Hide or unhide comments.
34
+ - Delete comments.
35
+ - **✉️ Direct Messaging (Instagram Messaging API)**:
36
+ - Send text DMs to users using their Instagram-Scoped ID (IGSID).
37
+ - Send media messages with attachments (image, video, audio, file).
38
+ - Retrieve active conversation threads and message histories.
39
+ - **📊 Insights & Analytics**:
40
+ - Account-level metrics: *reach*, *views*, *profile views*, *accounts engaged*, *total interactions*, *follower count*, *website clicks*, etc.
41
+ - Media-level metrics: *reach*, *views*, *engagement*, *saved*, *shares*, *likes*, *comments*, *plays*, *profile visits*.
42
+ - Flexible **All Metrics (Select All)** or specific selection mode.
43
+ - **🤖 AI Agent Tool Support (LangChain / n8n AI)**:
44
+ - Connect directly to the **AI Agent** node's `Tool` connector using the dedicated **Instagram Tool** sub-node.
45
+ - Allows autonomous AI agents to browse profiles, reply to comments, send DMs, publish content, and retrieve insights on demand.
46
+ - **⚡ Custom Graph API Call**:
47
+ - Execute custom HTTP requests (GET, POST, DELETE) to any Meta Graph API `v26.0` endpoint with automated authentication.
48
+
49
+ ---
50
+
51
+ ## 🔑 How to Setup OAuth & Get Instagram Client ID and Secret
52
+
53
+ Follow these step-by-step instructions to get your **Instagram Client ID** and **Instagram Client Secret** from the Meta App Dashboard:
54
+
55
+ ### 1. Create a Meta Developer App
56
+ 1. Go to [Meta for Developers Portal](https://developers.facebook.com/apps) and log in (or sign up).
57
+ 2. Click **Create App** (choose **Other** or **Business** as the app type).
58
+
59
+ ### 2. Add Instagram Use Case / Product
60
+ 1. In the app dashboard, navigate to **Use Cases** or **Add Product**.
61
+ 2. Select **Manage messaging & content on Instagram** (or **Instagram Platform** > **Instagram API with Instagram Login**).
62
+
63
+ ### 3. Retrieve Instagram Client ID & Secret
64
+ 1. In the left sidebar, navigate to:
65
+ **Instagram Platform** > **API setup with Instagram login** > **3. Set up Instagram business login** > **Business login settings** (or **Customize use case > Instagram**).
66
+ 2. On this page, you will find:
67
+ - 🔑 **Instagram App ID**: This is your **Client ID** for n8n.
68
+ - 🔒 **Instagram App Secret**: Click **Show** (enter your account password if prompted). This is your **Client Secret** for n8n.
69
+
70
+ > [!IMPORTANT]
71
+ > **Do NOT use the Facebook App ID** from the top header of the Meta Dashboard. You must use the specific **Instagram App ID** found inside the Instagram Platform settings.
72
+
73
+ ### 4. Add n8n OAuth Callback URL
74
+ 1. Open n8n and create a new **Instagram OAuth2 API** credential.
75
+ 2. Copy the **OAuth Callback URL** displayed in the modal (e.g. `https://your-n8n-instance.com/rest/oauth2-credential/callback`).
76
+ 3. Back in Meta App Dashboard under **Business login settings > Valid OAuth Redirect URIs**, paste the callback URL.
77
+ 4. Click **Save Changes**.
78
+
79
+ ---
80
+
81
+ ## 🔒 Required OAuth Permissions / Scopes
82
+
83
+ The node uses the latest official Instagram Business Login scopes:
84
+ * `instagram_business_basic`: Read profile info and basic media data.
85
+ * `instagram_business_content_publish`: Upload and publish photos, videos, reels, stories, and carousels.
86
+ * `instagram_business_manage_messages`: Send and receive direct messages.
87
+ * `instagram_business_manage_comments`: Moderate, create, reply to, and delete comments.
88
+
89
+ ---
90
+
91
+ ## 🚀 Installation in n8n
92
+
93
+ ### Option 1: Community Nodes UI (Recommended)
94
+ 1. Open your **n8n instance**.
95
+ 2. Go to **Settings** > **Community Nodes**.
96
+ 3. Click **Install a community node**.
97
+ 4. Enter the package name: `@xnkee/n8n-nodes-instagram`
98
+ 5. Accept the risks and click **Install**.
99
+
100
+ ### Option 2: Manual / Local Development (with Bun)
101
+ ```bash
102
+ # Clone the repository
103
+ git clone https://github.com/legenhand/n8n-nodes-instagram-api.git
104
+ cd n8n-nodes-instagram-api
105
+
106
+ # Install dependencies and build
107
+ bun install
108
+ bun run build
109
+
110
+ # Link package globally
111
+ bun link
112
+ ```
113
+
114
+ In your n8n root / custom nodes folder:
115
+ ```bash
116
+ npm link @xnkee/n8n-nodes-instagram
117
+ ```
118
+
119
+ ---
120
+
121
+ ## 🛠️ Credentials Configuration in n8n
122
+
123
+ ### 1. Instagram OAuth2 API (Business Login - Recommended)
124
+ - **Client ID (Instagram App ID)**: Your Instagram App ID from Meta Dashboard.
125
+ - **Client Secret (Instagram App Secret)**: Your Instagram App Secret.
126
+ - **Scope**: `instagram_business_basic,instagram_business_content_publish,instagram_business_manage_messages,instagram_business_manage_comments` (editable).
127
+ - **API Version**: `v26.0` (default)
128
+ - **Base URL**: `https://graph.instagram.com`
129
+
130
+ ### 2. Instagram Access Token API
131
+ - **Access Token**: Short-lived or 60-day Long-Lived User Access Token.
132
+ - **API Version**: `v26.0` (default)
133
+ - **Base URL**: `https://graph.instagram.com`
134
+
135
+ ---
136
+
137
+ ## 📂 Project Structure
138
+
139
+ ```
140
+ n8n-nodes-instagram-api/
141
+ ├── credentials/
142
+ │ ├── InstagramApi.credentials.ts # Access Token Credentials
143
+ │ ├── InstagramOAuth2Api.credentials.ts # OAuth2 Business Login Credentials
144
+ │ ├── InstagramUnifiedLoginOAuth2Api.credentials.ts # Unified Login OAuth2 Credentials
145
+ │ └── instagram.svg # Vector Logo
146
+ ├── nodes/
147
+ │ └── Instagram/
148
+ │ ├── Instagram.node.ts # Main Node Controller & AI Tool Handler
149
+ │ ├── Instagram.node.json # Community Node Metadata
150
+ │ ├── GenericFunctions.ts # API Request Helper, Polling & Pagination
151
+ │ ├── instagram.svg # Node Icon
152
+ │ ├── handlers/ # Modular Action & Execution Handlers
153
+ │ │ ├── UserHandler.ts # User Profile & Insights Execution
154
+ │ │ ├── MediaHandler.ts # Media & Publishing Execution
155
+ │ │ ├── CommentHandler.ts # Comment Moderation Execution
156
+ │ │ ├── MessageHandler.ts # Direct Messaging Execution
157
+ │ │ ├── InsightHandler.ts # Insights & Analytics Execution
158
+ │ │ ├── MentionHandler.ts # Mention & Tag Execution
159
+ │ │ └── CustomHandler.ts # Custom Graph API Execution
160
+ │ └── descriptions/ # Modular UI & Parameter Definitions
161
+ │ ├── user/ # User operations & fields
162
+ │ ├── media/ # Media operations & fields
163
+ │ ├── comment/ # Comment operations & fields
164
+ │ ├── message/ # Message operations & fields
165
+ │ ├── insight/ # Insight operations & fields
166
+ │ ├── mention/ # Mention operations & fields
167
+ │ ├── custom/ # Custom request operations & fields
168
+ │ └── index.ts # Master descriptions export
169
+ ├── index.ts # Package Entry Point
170
+ ├── package.json
171
+ ├── tsconfig.json
172
+ └── README.md
173
+ ```
174
+
175
+ ---
176
+
177
+ ## 📄 License
178
+
179
+ [MIT License](LICENSE) © 2026 Rizki Firmansyah
@@ -0,0 +1,10 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class InstagramApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon: "file:instagram.svg";
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstagramApi = void 0;
4
+ class InstagramApi {
5
+ constructor() {
6
+ this.name = 'instagramApi';
7
+ this.displayName = 'Instagram Access Token API';
8
+ this.documentationUrl = 'https://developers.facebook.com/documentation/instagram-platform/instagram-api-with-instagram-login';
9
+ this.icon = 'file:instagram.svg';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Access Token',
13
+ name: 'accessToken',
14
+ type: 'string',
15
+ typeOptions: { password: true },
16
+ default: '',
17
+ required: true,
18
+ description: 'Instagram User Access Token (Short-lived or Long-lived token) obtained via Instagram Login or Meta Developer Portal',
19
+ },
20
+ {
21
+ displayName: 'API Version',
22
+ name: 'apiVersion',
23
+ type: 'string',
24
+ default: 'v26.0',
25
+ description: 'Meta Graph API version to use (e.g. v26.0)',
26
+ },
27
+ {
28
+ displayName: 'Base URL',
29
+ name: 'baseUrl',
30
+ type: 'string',
31
+ default: 'https://graph.instagram.com',
32
+ description: 'Instagram Graph API Base URL for Instagram Login',
33
+ },
34
+ ];
35
+ this.authenticate = {
36
+ type: 'generic',
37
+ properties: {
38
+ headers: {
39
+ Authorization: '=Bearer {{$credentials.accessToken}}',
40
+ },
41
+ },
42
+ };
43
+ this.test = {
44
+ request: {
45
+ baseURL: '={{$credentials.baseUrl || "https://graph.instagram.com"}}/{{$credentials.apiVersion || "v26.0"}}',
46
+ url: '/me',
47
+ qs: {
48
+ fields: 'id,username',
49
+ },
50
+ },
51
+ };
52
+ }
53
+ }
54
+ exports.InstagramApi = InstagramApi;
55
+ //# sourceMappingURL=InstagramApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstagramApi.credentials.js","sourceRoot":"","sources":["../../credentials/InstagramApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,YAAY;IAAzB;QACE,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,4BAA4B,CAAC;QAC3C,qBAAgB,GAAG,qGAAqG,CAAC;QACzH,SAAI,GAAG,oBAA6B,CAAC;QAErC,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,qHAAqH;aACnI;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6BAA6B;gBACtC,WAAW,EAAE,kDAAkD;aAChE;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,aAAa,EAAE,sCAAsC;iBACtD;aACF;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,mGAAmG;gBAC5G,GAAG,EAAE,KAAK;gBACV,EAAE,EAAE;oBACF,MAAM,EAAE,aAAa;iBACtB;aACF;SACF,CAAC;IACJ,CAAC;CAAA;AAlDD,oCAkDC"}
@@ -0,0 +1,10 @@
1
+ import { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class InstagramOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ icon: "file:instagram.svg";
8
+ properties: INodeProperties[];
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstagramOAuth2Api = void 0;
4
+ class InstagramOAuth2Api {
5
+ constructor() {
6
+ this.name = 'instagramOAuth2Api';
7
+ this.extends = ['oAuth2Api'];
8
+ this.displayName = 'Instagram OAuth2 API';
9
+ this.documentationUrl = 'https://developers.facebook.com/documentation/instagram-platform/instagram-api-with-instagram-login';
10
+ this.icon = 'file:instagram.svg';
11
+ this.properties = [
12
+ {
13
+ displayName: 'Grant Type',
14
+ name: 'grantType',
15
+ type: 'hidden',
16
+ default: 'authorizationCode',
17
+ },
18
+ {
19
+ displayName: 'Authorization URL',
20
+ name: 'authUrl',
21
+ type: 'hidden',
22
+ default: 'https://www.instagram.com/oauth/authorize',
23
+ },
24
+ {
25
+ displayName: 'Access Token URL',
26
+ name: 'accessTokenUrl',
27
+ type: 'hidden',
28
+ default: 'https://api.instagram.com/oauth/access_token',
29
+ },
30
+ {
31
+ displayName: 'Client ID (Instagram App ID)',
32
+ name: 'clientId',
33
+ type: 'string',
34
+ default: '',
35
+ required: true,
36
+ description: 'Your Instagram App ID (found in App Dashboard > Instagram > API setup with Instagram login > 3. Set up Instagram business login > Business login settings > Instagram App ID). Do NOT use the main Facebook App ID.',
37
+ },
38
+ {
39
+ displayName: 'Client Secret (Instagram App Secret)',
40
+ name: 'clientSecret',
41
+ type: 'string',
42
+ typeOptions: { password: true },
43
+ default: '',
44
+ required: true,
45
+ description: 'Your Instagram App Secret (found in App Dashboard > Instagram > API setup with Instagram login > 3. Set up Instagram business login > Business login settings > Instagram App Secret).',
46
+ },
47
+ {
48
+ displayName: 'Scope',
49
+ name: 'scope',
50
+ type: 'string',
51
+ default: 'instagram_business_basic,instagram_business_content_publish,instagram_business_manage_messages,instagram_business_manage_comments',
52
+ description: 'Comma-separated OAuth scopes for Instagram Business Login (e.g. instagram_business_basic, instagram_business_content_publish, instagram_business_manage_messages, instagram_business_manage_comments)',
53
+ },
54
+ {
55
+ displayName: 'Auth URI Query Parameters',
56
+ name: 'authQueryParameters',
57
+ type: 'hidden',
58
+ default: 'response_type=code',
59
+ },
60
+ {
61
+ displayName: 'Authentication',
62
+ name: 'authentication',
63
+ type: 'hidden',
64
+ default: 'body',
65
+ },
66
+ {
67
+ displayName: 'API Version',
68
+ name: 'apiVersion',
69
+ type: 'string',
70
+ default: 'v26.0',
71
+ description: 'Meta Graph API version to use (e.g. v26.0)',
72
+ },
73
+ {
74
+ displayName: 'Base URL',
75
+ name: 'baseUrl',
76
+ type: 'string',
77
+ default: 'https://graph.instagram.com',
78
+ description: 'Instagram Graph API Base URL for Instagram Login',
79
+ },
80
+ ];
81
+ this.test = {
82
+ request: {
83
+ baseURL: '={{$credentials.baseUrl || "https://graph.instagram.com"}}/{{$credentials.apiVersion || "v26.0"}}',
84
+ url: '/me',
85
+ qs: {
86
+ fields: 'id,username',
87
+ },
88
+ },
89
+ };
90
+ }
91
+ }
92
+ exports.InstagramOAuth2Api = InstagramOAuth2Api;
93
+ //# sourceMappingURL=InstagramOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstagramOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/InstagramOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,kBAAkB;IAA/B;QACE,SAAI,GAAG,oBAAoB,CAAC;QAC5B,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,sBAAsB,CAAC;QACrC,qBAAgB,GAAG,qGAAqG,CAAC;QACzH,SAAI,GAAG,oBAA6B,CAAC;QAErC,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC7B;YACD;gBACE,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,2CAA2C;aACrD;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8CAA8C;aACxD;YACD;gBACE,WAAW,EAAE,8BAA8B;gBAC3C,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,qNAAqN;aACxN;YACD;gBACE,WAAW,EAAE,sCAAsC;gBACnD,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,wLAAwL;aAC3L;YACD;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EACL,mIAAmI;gBACrI,WAAW,EACT,uMAAuM;aAC1M;YACD;gBACE,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oBAAoB;aAC9B;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aAChB;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6BAA6B;gBACtC,WAAW,EAAE,kDAAkD;aAChE;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,mGAAmG;gBAC5G,GAAG,EAAE,KAAK;gBACV,EAAE,EAAE;oBACF,MAAM,EAAE,aAAa;iBACtB;aACF;SACF,CAAC;IACJ,CAAC;CAAA;AA3FD,gDA2FC"}
@@ -0,0 +1,17 @@
1
+ import { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ /**
3
+ * Instagram API with Unified Login.
4
+ *
5
+ * Clients log in with Instagram or Facebook through a login configuration (config_id)
6
+ * created in the Meta App Dashboard. The app receives a Business Integration System User
7
+ * Access Token and calls graph.facebook.com using the Instagram account ID in the path.
8
+ */
9
+ export declare class InstagramUnifiedLoginOAuth2Api implements ICredentialType {
10
+ name: string;
11
+ extends: string[];
12
+ displayName: string;
13
+ documentationUrl: string;
14
+ icon: "file:instagram.svg";
15
+ properties: INodeProperties[];
16
+ test: ICredentialTestRequest;
17
+ }
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstagramUnifiedLoginOAuth2Api = void 0;
4
+ /**
5
+ * Instagram API with Unified Login.
6
+ *
7
+ * Clients log in with Instagram or Facebook through a login configuration (config_id)
8
+ * created in the Meta App Dashboard. The app receives a Business Integration System User
9
+ * Access Token and calls graph.facebook.com using the Instagram account ID in the path.
10
+ */
11
+ class InstagramUnifiedLoginOAuth2Api {
12
+ constructor() {
13
+ this.name = 'instagramUnifiedLoginOAuth2Api';
14
+ this.extends = ['oAuth2Api'];
15
+ this.displayName = 'Instagram Unified Login OAuth2 API';
16
+ this.documentationUrl = 'https://developers.facebook.com/documentation/instagram-platform/instagram-api-with-unified-login';
17
+ this.icon = 'file:instagram.svg';
18
+ this.properties = [
19
+ {
20
+ displayName: 'Grant Type',
21
+ name: 'grantType',
22
+ type: 'hidden',
23
+ default: 'authorizationCode',
24
+ },
25
+ {
26
+ displayName: 'Authorization URL',
27
+ name: 'authUrl',
28
+ type: 'hidden',
29
+ default: 'https://www.facebook.com/dialog/oauth',
30
+ },
31
+ {
32
+ displayName: 'Access Token URL',
33
+ name: 'accessTokenUrl',
34
+ type: 'hidden',
35
+ default: '=https://graph.facebook.com/{{$self["apiVersion"] || "v27.0"}}/oauth/access_token',
36
+ },
37
+ {
38
+ displayName: 'Client ID (Meta App ID)',
39
+ name: 'clientId',
40
+ type: 'string',
41
+ default: '',
42
+ required: true,
43
+ description: 'Your Meta App ID (App Dashboard > App settings > Basic). Do NOT use the Instagram App ID.',
44
+ },
45
+ {
46
+ displayName: 'Client Secret (Meta App Secret)',
47
+ name: 'clientSecret',
48
+ type: 'string',
49
+ typeOptions: { password: true },
50
+ default: '',
51
+ required: true,
52
+ description: 'Your Meta App Secret (App Dashboard > App settings > Basic). Do NOT use the Instagram App Secret.',
53
+ },
54
+ {
55
+ displayName: 'Configuration ID',
56
+ name: 'configId',
57
+ type: 'string',
58
+ default: '',
59
+ required: true,
60
+ description: 'The ID of the Unified Login configuration created in the App Dashboard. It defines the permissions and assets your app asks for. Its Redirect URL must match the OAuth Redirect URL shown above exactly.',
61
+ },
62
+ {
63
+ displayName: 'Instagram Account ID',
64
+ name: 'instagramAccountId',
65
+ type: 'string',
66
+ default: '',
67
+ description: 'ID of the Instagram professional account to use. Leave empty to auto-detect it when exactly one account was shared during login (via /me/assigned_instagram_accounts).',
68
+ },
69
+ {
70
+ // Permissions come from the configuration (config_id), not from a scope parameter.
71
+ displayName: 'Scope',
72
+ name: 'scope',
73
+ type: 'hidden',
74
+ default: '',
75
+ },
76
+ {
77
+ displayName: 'Auth URI Query Parameters',
78
+ name: 'authQueryParameters',
79
+ type: 'hidden',
80
+ default: '=config_id={{$self["configId"]}}&response_type=code',
81
+ },
82
+ {
83
+ displayName: 'Authentication',
84
+ name: 'authentication',
85
+ type: 'hidden',
86
+ default: 'body',
87
+ },
88
+ {
89
+ displayName: 'API Version',
90
+ name: 'apiVersion',
91
+ type: 'string',
92
+ default: 'v27.0',
93
+ description: 'Meta Graph API version to use (e.g. v27.0)',
94
+ },
95
+ {
96
+ displayName: 'Base URL',
97
+ name: 'baseUrl',
98
+ type: 'string',
99
+ default: 'https://graph.facebook.com',
100
+ description: 'Graph API Base URL for Unified Login',
101
+ },
102
+ ];
103
+ // With this token, /me returns the business integration system user (not the Instagram account).
104
+ this.test = {
105
+ request: {
106
+ baseURL: '={{$credentials.baseUrl || "https://graph.facebook.com"}}/{{$credentials.apiVersion || "v27.0"}}',
107
+ url: '/me',
108
+ qs: {
109
+ fields: 'id,client_business_id',
110
+ },
111
+ },
112
+ };
113
+ }
114
+ }
115
+ exports.InstagramUnifiedLoginOAuth2Api = InstagramUnifiedLoginOAuth2Api;
116
+ //# sourceMappingURL=InstagramUnifiedLoginOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstagramUnifiedLoginOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/InstagramUnifiedLoginOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAMA;;;;;;GAMG;AACH,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAC;QACxC,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,oCAAoC,CAAC;QACnD,qBAAgB,GACd,mGAAmG,CAAC;QACtG,SAAI,GAAG,oBAA6B,CAAC;QAErC,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC7B;YACD;gBACE,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uCAAuC;aACjD;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mFAAmF;aAC7F;YACD;gBACE,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,2FAA2F;aAC9F;YACD;gBACE,WAAW,EAAE,iCAAiC;gBAC9C,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,mGAAmG;aACtG;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,0MAA0M;aAC7M;YACD;gBACE,WAAW,EAAE,sBAAsB;gBACnC,IAAI,EAAE,oBAAoB;gBAC1B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACT,wKAAwK;aAC3K;YACD;gBACE,mFAAmF;gBACnF,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,qDAAqD;aAC/D;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aAChB;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,4BAA4B;gBACrC,WAAW,EAAE,sCAAsC;aACpD;SACF,CAAC;QAEF,iGAAiG;QACjG,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EACL,kGAAkG;gBACpG,GAAG,EAAE,KAAK;gBACV,EAAE,EAAE;oBACF,MAAM,EAAE,uBAAuB;iBAChC;aACF;SACF,CAAC;IACJ,CAAC;CAAA;AA7GD,wEA6GC"}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="1000" height="1000" viewBox="0 0 264.5833 264.5833" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)" sodipodi:docname="Instagram_(2022).svg"><defs><radialGradient id="f" cx="158.429" cy="578.088" r="52.3515" xlink:href="#a" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -4.03418 4.28018 0 -2332.2273 942.2356)" fx="158.429" fy="578.088"/><radialGradient inkscape:collect="always" xlink:href="#b" id="g" gradientUnits="userSpaceOnUse" gradientTransform="matrix(.67441 -1.16203 1.51283 .87801 -814.3657 -47.8354)" cx="172.6149" cy="600.6924" fx="172.6149" fy="600.6924" r="65"/><radialGradient inkscape:collect="always" xlink:href="#c" id="h" cx="144.012" cy="51.3367" fx="144.012" fy="51.3367" r="67.081" gradientTransform="matrix(-2.3989 .67549 -.23008 -.81732 464.9957 -26.4035)" gradientUnits="userSpaceOnUse"/><radialGradient inkscape:collect="always" xlink:href="#d" id="e" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-3.10797 .87652 -.6315 -2.23914 1345.6503 1374.1983)" cx="199.7884" cy="628.4379" fx="199.7884" fy="628.4379" r="52.3515"/><linearGradient inkscape:collect="always" id="d"><stop offset="0" stop-color="#ff005f"/><stop offset="1" stop-color="#fc01d8"/></linearGradient><linearGradient id="c"><stop offset="0" stop-color="#780cff"/><stop stop-color="#820bff" offset="1" stop-opacity="0"/></linearGradient><linearGradient inkscape:collect="always" id="b"><stop offset="0" stop-color="#fc0"/><stop offset="1" stop-color="#fc0" stop-opacity="0"/></linearGradient><linearGradient id="a"><stop offset="0" stop-color="#fc0"/><stop offset=".1242" stop-color="#fc0"/><stop offset=".5672" stop-color="#fe4a05"/><stop offset=".6942" stop-color="#ff0f3f"/><stop offset="1" stop-color="#fe0657" stop-opacity="0"/></linearGradient></defs><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:zoom=".515" inkscape:cx="500" inkscape:cy="500" inkscape:document-units="mm" inkscape:current-layer="layer1" inkscape:document-rotation="0" showgrid="false" inkscape:window-width="1366" inkscape:window-height="705" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1"/><g inkscape:label="Layer 1" inkscape:groupmode="layer"><path d="M204.1503 18.1429c-55.2305 0-71.3834.057-74.5232.3175-11.3342.9424-18.387 2.7275-26.0708 6.554-5.9214 2.9413-10.5915 6.3506-15.2005 11.1298-8.3938 8.7157-13.481 19.4383-15.3226 32.1842-.8953 6.1877-1.1558 7.4496-1.2087 39.0558-.0203 10.5354 0 24.4007 0 42.9984 0 55.2008.061 71.3418.3256 74.4764.9157 11.032 2.6453 17.9728 6.3081 25.565 7 14.5329 20.369 25.4428 36.119 29.5137 5.4535 1.4044 11.4767 2.1779 19.2092 2.5442 3.2762.1425 36.6684.2443 70.081.2443 33.4127 0 66.8253-.0407 70.02-.2035 8.9535-.4214 14.1526-1.1195 19.9011-2.6054 15.8517-4.0912 28.9767-14.8383 36.119-29.5748 3.5916-7.409 5.4128-14.6144 6.237-25.0704.179-2.2796.2543-38.6263.2543-74.924 0-36.304-.0814-72.5835-.2605-74.8632-.8343-10.6249-2.6555-17.7692-6.363-25.3207-3.0421-6.1816-6.42-10.798-11.324-15.518-8.752-8.3616-19.4555-13.4502-32.2101-15.2902-6.18-.8936-7.411-1.1582-39.033-1.2131z" inkscape:connector-curvature="0" fill="url(#e)" transform="translate(-71.8155 -18.1429)"/><path d="M204.1503 18.1429c-55.2305 0-71.3834.057-74.5232.3175-11.3342.9424-18.387 2.7275-26.0708 6.554-5.9214 2.9413-10.5915 6.3506-15.2005 11.1298-8.3938 8.7157-13.481 19.4383-15.3226 32.1842-.8953 6.1877-1.1558 7.4496-1.2087 39.0558-.0203 10.5354 0 24.4007 0 42.9984 0 55.2008.061 71.3418.3256 74.4764.9157 11.032 2.6453 17.9728 6.3081 25.565 7 14.5329 20.369 25.4428 36.119 29.5137 5.4535 1.4044 11.4767 2.1779 19.2092 2.5442 3.2762.1425 36.6684.2443 70.081.2443 33.4127 0 66.8253-.0407 70.02-.2035 8.9535-.4214 14.1526-1.1195 19.9011-2.6054 15.8517-4.0912 28.9767-14.8383 36.119-29.5748 3.5916-7.409 5.4128-14.6144 6.237-25.0704.179-2.2796.2543-38.6263.2543-74.924 0-36.304-.0814-72.5835-.2605-74.8632-.8343-10.6249-2.6555-17.7692-6.363-25.3207-3.0421-6.1816-6.42-10.798-11.324-15.518-8.752-8.3616-19.4555-13.4502-32.2101-15.2902-6.18-.8936-7.411-1.1582-39.033-1.2131z" inkscape:connector-curvature="0" fill="url(#f)" transform="translate(-71.8155 -18.1429)"/><path d="M204.1503 18.1429c-55.2305 0-71.3834.057-74.5232.3175-11.3342.9424-18.387 2.7275-26.0708 6.554-5.9214 2.9413-10.5915 6.3506-15.2005 11.1298-8.3938 8.7157-13.481 19.4383-15.3226 32.1842-.8953 6.1877-1.1558 7.4496-1.2087 39.0558-.0203 10.5354 0 24.4007 0 42.9984 0 55.2008.061 71.3418.3256 74.4764.9157 11.032 2.6453 17.9728 6.3081 25.565 7 14.5329 20.369 25.4428 36.119 29.5137 5.4535 1.4044 11.4767 2.1779 19.2092 2.5442 3.2762.1425 36.6684.2443 70.081.2443 33.4127 0 66.8253-.0407 70.02-.2035 8.9535-.4214 14.1526-1.1195 19.9011-2.6054 15.8517-4.0912 28.9767-14.8383 36.119-29.5748 3.5916-7.409 5.4128-14.6144 6.237-25.0704.179-2.2796.2543-38.6263.2543-74.924 0-36.304-.0814-72.5835-.2605-74.8632-.8343-10.6249-2.6555-17.7692-6.363-25.3207-3.0421-6.1816-6.42-10.798-11.324-15.518-8.752-8.3616-19.4555-13.4502-32.2101-15.2902-6.18-.8936-7.411-1.1582-39.033-1.2131z" inkscape:connector-curvature="0" fill="url(#g)" transform="translate(-71.8155 -18.1429)"/><path d="M204.1503 18.1429c-55.2305 0-71.3834.057-74.5232.3175-11.3342.9424-18.387 2.7275-26.0708 6.554-5.9214 2.9413-10.5915 6.3506-15.2005 11.1298-8.3938 8.7157-13.481 19.4383-15.3226 32.1842-.8953 6.1877-1.1558 7.4496-1.2087 39.0558-.0203 10.5354 0 24.4007 0 42.9984 0 55.2008.061 71.3418.3256 74.4764.9157 11.032 2.6453 17.9728 6.3081 25.565 7 14.5329 20.369 25.4428 36.119 29.5137 5.4535 1.4044 11.4767 2.1779 19.2092 2.5442 3.2762.1425 36.6684.2443 70.081.2443 33.4127 0 66.8253-.0407 70.02-.2035 8.9535-.4214 14.1526-1.1195 19.9011-2.6054 15.8517-4.0912 28.9767-14.8383 36.119-29.5748 3.5916-7.409 5.4128-14.6144 6.237-25.0704.179-2.2796.2543-38.6263.2543-74.924 0-36.304-.0814-72.5835-.2605-74.8632-.8343-10.6249-2.6555-17.7692-6.363-25.3207-3.0421-6.1816-6.42-10.798-11.324-15.518-8.752-8.3616-19.4555-13.4502-32.2101-15.2902-6.18-.8936-7.411-1.1582-39.033-1.2131z" inkscape:connector-curvature="0" fill="url(#h)" transform="translate(-71.8155 -18.1429)"/><path d="M132.3452 33.973c-26.7167 0-30.0696.1167-40.5629.5939-10.4727.4792-17.6212 2.136-23.8762 4.567-6.4701 2.5107-11.9586 5.8693-17.4265 11.3352-5.472 5.464-8.8332 10.9483-11.354 17.4116-2.4389 6.2524-4.099 13.3976-4.5703 23.8585-.4693 10.4854-.5923 13.8379-.5923 40.5348 0 26.697.1189 30.0371.5943 40.5225.4817 10.465 2.1397 17.6082 4.5703 23.8585 2.5147 6.4654 5.8758 11.9497 11.3458 17.4136 5.466 5.468 10.9544 8.8349 17.4204 11.3456 6.259 2.4309 13.4097 4.0877 23.8803 4.567 10.4933.477 13.8441.5938 40.5588.5938 26.7188 0 30.0615-.1167 40.5547-.5939 10.4728-.4792 17.6295-2.136 23.8885-4.567 6.4681-2.5106 11.9484-5.8775 17.4143-11.3455 5.472-5.4639 8.8332-10.9482 11.354-17.4115 2.4183-6.2524 4.0784-13.3976 4.5703-23.8585.4713-10.4854.5943-13.8277.5943-40.5246 0-26.697-.123-30.0473-.5943-40.5328-.4919-10.465-2.152-17.6081-4.5703-23.8584-2.5208-6.4654-5.882-11.9498-11.354-17.4137-5.4721-5.468-10.9442-8.8266-17.4204-11.3353-6.2714-2.4309-13.424-4.0877-23.8967-4.5669-10.4933-.4772-13.8339-.5939-40.5588-.5939zm-8.825 17.7147c2.6193-.0041 5.5418 0 8.825 0 26.2659 0 29.379.0942 39.7513.5652 9.5915.4383 14.7971 2.0397 18.2648 3.3852 4.5908 1.7817 7.8638 3.9116 11.3048 7.3521 3.4431 3.4406 5.5745 6.7173 7.3617 11.3046 1.3465 3.461 2.9512 8.6628 3.3877 18.2472.4714 10.3625.5739 13.4754.5739 39.7095 0 26.234-.1025 29.347-.5739 39.7095-.4386 9.5843-2.0412 14.7861-3.3877 18.2471-1.783 4.5874-3.9186 7.8539-7.3617 11.2923-3.443 3.4406-6.712 5.5704-11.3048 7.3521-3.4636 1.3517-8.6733 2.949-18.2648 3.3873-10.3702.471-13.4854.5734-39.7513.5734-26.2679 0-29.381-.1024-39.7513-.5734-9.5914-.4423-14.797-2.0438-18.2668-3.3893-4.5908-1.7817-7.87-3.9116-11.313-7.3521-3.4431-3.4405-5.5745-6.709-7.3617-11.2985-1.3465-3.461-2.9512-8.6628-3.3877-18.2471-.4714-10.3626-.5657-13.4754-.5657-39.7259 0-26.2504.0943-29.347.5657-39.7095.4386-9.5844 2.0412-14.7861 3.3877-18.2512 1.783-4.5874 3.9186-7.8641 7.3617-11.3046 3.443-3.4406 6.7222-5.5704 11.313-7.3562 3.4677-1.3517 8.6754-2.949 18.2668-3.3894 9.075-.4096 12.5919-.5324 30.9264-.553zm61.3363 16.322c-6.5173 0-11.805 5.2776-11.805 11.792 0 6.5125 5.2877 11.7962 11.805 11.7962 6.5172 0 11.8049-5.2837 11.8049-11.7962 0-6.5124-5.2877-11.796-11.805-11.796zm-52.5113 13.7826c-27.8993 0-50.5191 22.6031-50.5191 50.4817 0 27.8786 22.6198 50.4714 50.5191 50.4714s50.511-22.5928 50.511-50.4714c0-27.8786-22.6137-50.4817-50.513-50.4817zm0 17.7147c18.109 0 32.7914 14.6694 32.7914 32.767 0 18.0956-14.6824 32.767-32.7914 32.767-18.111 0-32.7913-14.6714-32.7913-32.767 0-18.0976 14.6803-32.767 32.7913-32.767z" inkscape:connector-curvature="0" fill="#fff"/></g></svg>
@@ -0,0 +1,4 @@
1
+ export * from './nodes/Instagram/Instagram.node';
2
+ export * from './credentials/InstagramApi.credentials';
3
+ export * from './credentials/InstagramOAuth2Api.credentials';
4
+ export * from './credentials/InstagramUnifiedLoginOAuth2Api.credentials';
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./nodes/Instagram/Instagram.node"), exports);
18
+ __exportStar(require("./credentials/InstagramApi.credentials"), exports);
19
+ __exportStar(require("./credentials/InstagramOAuth2Api.credentials"), exports);
20
+ __exportStar(require("./credentials/InstagramUnifiedLoginOAuth2Api.credentials"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,yEAAuD;AACvD,+EAA6D;AAC7D,2FAAyE"}
@@ -0,0 +1,28 @@
1
+ import { IDataObject, IExecuteFunctions, IHookFunctions, IHttpRequestMethods, ILoadOptionsFunctions } from 'n8n-workflow';
2
+ type InstagramRequestContext = IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions;
3
+ export declare const UNIFIED_LOGIN_CREDENTIAL = "instagramUnifiedLoginOAuth2Api";
4
+ /**
5
+ * Resolves which credential type the node is configured to use, based on the
6
+ * "Authentication" parameter. Falls back to probing when the parameter is unavailable.
7
+ */
8
+ export declare function getCredentialType(this: InstagramRequestContext): Promise<string>;
9
+ export declare function isUnifiedLogin(this: InstagramRequestContext): Promise<boolean>;
10
+ /**
11
+ * Unified Login only: returns the Instagram professional account ID to use in request paths.
12
+ * Uses the ID set on the credential, otherwise auto-detects it when exactly one account
13
+ * was shared with the app.
14
+ */
15
+ export declare function getUnifiedLoginAccountId(this: InstagramRequestContext): Promise<string>;
16
+ /**
17
+ * Performs an authenticated Graph API request.
18
+ *
19
+ * With Unified Login, "/me" refers to the business integration system user rather than
20
+ * the Instagram account, so a leading "/me" segment is replaced with the Instagram
21
+ * account ID. Pass `rawEndpoint: true` in `options` to send the endpoint untouched.
22
+ */
23
+ export declare function instagramApiRequest(this: InstagramRequestContext, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject, options?: IDataObject): Promise<any>;
24
+ export declare function instagramApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject, limit?: number): Promise<any[]>;
25
+ export declare function pollMediaContainerStatus(this: IExecuteFunctions, containerId: string, maxAttempts?: number, delayMs?: number): Promise<void>;
26
+ export declare function getResolvedUserId(this: IExecuteFunctions, specifiedUserId?: string): Promise<string>;
27
+ export declare function resolveParameterList(this: IExecuteFunctions, itemIndex: number, allDefaultValue: string, paramName?: string, modeParamName?: string): string;
28
+ export {};