@xnkee/n8n-nodes-instagram 1.7.0 → 2.1.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.
- package/{LICENSE.md → LICENSE} +21 -21
- package/README.md +132 -437
- package/dist/credentials/InstagramApi.credentials.d.ts +10 -0
- package/dist/credentials/InstagramApi.credentials.js +55 -0
- package/dist/credentials/InstagramApi.credentials.js.map +1 -0
- package/dist/credentials/InstagramOAuth2Api.credentials.d.ts +2 -2
- package/dist/credentials/InstagramOAuth2Api.credentials.js +33 -113
- package/dist/credentials/InstagramOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.d.ts +17 -0
- package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.js +116 -0
- package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/instagram.svg +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/Instagram/GenericFunctions.d.ts +27 -23
- package/dist/nodes/Instagram/GenericFunctions.js +182 -223
- package/dist/nodes/Instagram/GenericFunctions.js.map +1 -1
- package/dist/nodes/Instagram/Instagram.node.d.ts +1 -1
- package/dist/nodes/Instagram/Instagram.node.js +109 -2353
- package/dist/nodes/Instagram/Instagram.node.js.map +1 -1
- package/dist/nodes/Instagram/Instagram.node.json +17 -0
- package/dist/nodes/Instagram/InstagramChatTrigger.node.d.ts +17 -0
- package/dist/nodes/Instagram/InstagramChatTrigger.node.js +415 -0
- package/dist/nodes/Instagram/InstagramChatTrigger.node.js.map +1 -0
- package/dist/nodes/Instagram/InstagramChatTrigger.node.json +16 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.fields.js +161 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.operations.js +62 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/comment/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/comment/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/comment/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.fields.js +65 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.operations.js +26 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/custom/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/custom/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/custom/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/index.d.ts +7 -0
- package/dist/nodes/Instagram/descriptions/index.js +24 -0
- package/dist/nodes/Instagram/descriptions/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.js +164 -0
- package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/Insight.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/insight/Insight.operations.js +32 -0
- package/dist/nodes/Instagram/descriptions/insight/Insight.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.js +87 -0
- package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/index.d.ts +4 -0
- package/dist/nodes/Instagram/descriptions/insight/index.js +12 -0
- package/dist/nodes/Instagram/descriptions/insight/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/Media.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/media/Media.operations.js +62 -0
- package/dist/nodes/Instagram/descriptions/media/Media.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.js +163 -0
- package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.js +285 -0
- package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/index.d.ts +4 -0
- package/dist/nodes/Instagram/descriptions/media/index.js +12 -0
- package/dist/nodes/Instagram/descriptions/media/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.fields.js +122 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.operations.js +38 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/mention/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/mention/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/mention/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/message/Message.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/message/Message.fields.js +123 -0
- package/dist/nodes/Instagram/descriptions/message/Message.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/message/Message.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/message/Message.operations.js +44 -0
- package/dist/nodes/Instagram/descriptions/message/Message.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/message/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/message/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/message/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/User.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/user/User.operations.js +38 -0
- package/dist/nodes/Instagram/descriptions/user/User.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.js +164 -0
- package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.js +83 -0
- package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/index.d.ts +4 -0
- package/dist/nodes/Instagram/descriptions/user/index.js +12 -0
- package/dist/nodes/Instagram/descriptions/user/index.js.map +1 -0
- package/dist/nodes/Instagram/handlers/CommentHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/CommentHandler.js +63 -0
- package/dist/nodes/Instagram/handlers/CommentHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/CustomHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/CustomHandler.js +28 -0
- package/dist/nodes/Instagram/handlers/CustomHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/InsightHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/InsightHandler.js +42 -0
- package/dist/nodes/Instagram/handlers/InsightHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/MediaHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/MediaHandler.js +172 -0
- package/dist/nodes/Instagram/handlers/MediaHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/MentionHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/MentionHandler.js +48 -0
- package/dist/nodes/Instagram/handlers/MentionHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/MessageHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/MessageHandler.js +57 -0
- package/dist/nodes/Instagram/handlers/MessageHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/UserHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/UserHandler.js +48 -0
- package/dist/nodes/Instagram/handlers/UserHandler.js.map +1 -0
- package/dist/nodes/Instagram/instagram.svg +1 -0
- package/package.json +34 -46
- package/API_REFERENCE.md +0 -907
- package/AUTHENTICATION_GUIDE.md +0 -718
- package/CHANGELOG.md +0 -391
- package/dist/credentials/InstagramUnifiedLoginApi.credentials.d.ts +0 -9
- package/dist/credentials/InstagramUnifiedLoginApi.credentials.js +0 -481
- package/dist/credentials/InstagramUnifiedLoginApi.credentials.js.map +0 -1
- package/dist/nodes/Instagram/InstagramTrigger.node.d.ts +0 -17
- package/dist/nodes/Instagram/InstagramTrigger.node.js +0 -398
- package/dist/nodes/Instagram/InstagramTrigger.node.js.map +0 -1
- package/dist/nodes/Instagram/instagram-large.svg +0 -27
- package/dist/nodes/Instagram/instagram-small.svg +0 -14
- package/dist/nodes/Instagram/types.d.ts +0 -171
- package/dist/nodes/Instagram/types.js +0 -3
- package/dist/nodes/Instagram/types.js.map +0 -1
- package/dist/package.json +0 -76
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/index.js +0 -0
package/API_REFERENCE.md
DELETED
|
@@ -1,907 +0,0 @@
|
|
|
1
|
-
# Instagram API Reference
|
|
2
|
-
|
|
3
|
-
Complete API reference for @xnkee/n8n-nodes-instagram operations.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- [Instagram Node](#instagram-node)
|
|
8
|
-
- [Message Operations](#message-operations)
|
|
9
|
-
- [Comment Operations](#comment-operations)
|
|
10
|
-
- [User Operations](#user-operations)
|
|
11
|
-
- [Instagram Trigger Node](#instagram-trigger-node)
|
|
12
|
-
- [Webhook Events](#webhook-events)
|
|
13
|
-
- [Error Codes](#error-codes)
|
|
14
|
-
- [Rate Limits](#rate-limits)
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Instagram Node
|
|
19
|
-
|
|
20
|
-
The main Instagram node provides messaging and user management capabilities.
|
|
21
|
-
|
|
22
|
-
### Message Operations
|
|
23
|
-
|
|
24
|
-
#### Send Text Message
|
|
25
|
-
|
|
26
|
-
Send a plain text message to an Instagram user.
|
|
27
|
-
|
|
28
|
-
**Parameters:**
|
|
29
|
-
|
|
30
|
-
| Parameter | Type | Required | Description |
|
|
31
|
-
|-----------|------|----------|-------------|
|
|
32
|
-
| Recipient ID | string | Yes | Instagram-scoped user ID (IGSID) |
|
|
33
|
-
| Message Text | string | Yes | Text content (max 1000 characters) |
|
|
34
|
-
|
|
35
|
-
**Example:**
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"recipientId": "1234567890",
|
|
40
|
-
"messageText": "Hello! Thanks for reaching out."
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**API Endpoint:** `POST /me/messages`
|
|
45
|
-
|
|
46
|
-
**Request Body:**
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"recipient": { "id": "1234567890" },
|
|
50
|
-
"message": { "text": "Hello! Thanks for reaching out." }
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**Response:**
|
|
55
|
-
```json
|
|
56
|
-
{
|
|
57
|
-
"recipient_id": "1234567890",
|
|
58
|
-
"message_id": "mid.abc123def456"
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
#### Send Image Message
|
|
65
|
-
|
|
66
|
-
Send an image via public HTTPS URL.
|
|
67
|
-
|
|
68
|
-
**Parameters:**
|
|
69
|
-
|
|
70
|
-
| Parameter | Type | Required | Description |
|
|
71
|
-
|-----------|------|----------|-------------|
|
|
72
|
-
| Recipient ID | string | Yes | Instagram-scoped user ID |
|
|
73
|
-
| Image URL | string | Yes | Public HTTPS URL of image (JPG, PNG) |
|
|
74
|
-
| Is Reusable | boolean | No | Make attachment reusable (default: false) |
|
|
75
|
-
|
|
76
|
-
**Example:**
|
|
77
|
-
|
|
78
|
-
```json
|
|
79
|
-
{
|
|
80
|
-
"recipientId": "1234567890",
|
|
81
|
-
"imageUrl": "https://example.com/image.jpg",
|
|
82
|
-
"isReusable": true
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**API Endpoint:** `POST /me/messages`
|
|
87
|
-
|
|
88
|
-
**Request Body:**
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"recipient": { "id": "1234567890" },
|
|
92
|
-
"message": {
|
|
93
|
-
"attachment": {
|
|
94
|
-
"type": "image",
|
|
95
|
-
"payload": {
|
|
96
|
-
"url": "https://example.com/image.jpg",
|
|
97
|
-
"is_reusable": true
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**Constraints:**
|
|
105
|
-
- Must be HTTPS
|
|
106
|
-
- Max file size: 8MB
|
|
107
|
-
- Supported formats: JPG, PNG, GIF
|
|
108
|
-
- Dimensions: Up to 8192x8192 pixels
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
#### Send Audio Message
|
|
113
|
-
|
|
114
|
-
Send an audio file via public HTTPS URL.
|
|
115
|
-
|
|
116
|
-
**Parameters:**
|
|
117
|
-
|
|
118
|
-
| Parameter | Type | Required | Description |
|
|
119
|
-
|-----------|------|----------|-------------|
|
|
120
|
-
| Recipient ID | string | Yes | Instagram-scoped user ID |
|
|
121
|
-
| Audio URL | string | Yes | Public HTTPS URL of audio file |
|
|
122
|
-
| Is Reusable | boolean | No | Make attachment reusable (default: false) |
|
|
123
|
-
|
|
124
|
-
**Example:**
|
|
125
|
-
|
|
126
|
-
```json
|
|
127
|
-
{
|
|
128
|
-
"recipientId": "1234567890",
|
|
129
|
-
"audioUrl": "https://example.com/audio.mp3",
|
|
130
|
-
"isReusable": false
|
|
131
|
-
}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**API Endpoint:** `POST /me/messages`
|
|
135
|
-
|
|
136
|
-
**Constraints:**
|
|
137
|
-
- Must be HTTPS
|
|
138
|
-
- Max file size: 25MB
|
|
139
|
-
- Supported formats: MP3, WAV, M4A
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
#### Send Video Message
|
|
144
|
-
|
|
145
|
-
Send a video file via public HTTPS URL.
|
|
146
|
-
|
|
147
|
-
**Parameters:**
|
|
148
|
-
|
|
149
|
-
| Parameter | Type | Required | Description |
|
|
150
|
-
|-----------|------|----------|-------------|
|
|
151
|
-
| Recipient ID | string | Yes | Instagram-scoped user ID |
|
|
152
|
-
| Video URL | string | Yes | Public HTTPS URL of video file |
|
|
153
|
-
| Is Reusable | boolean | No | Make attachment reusable (default: false) |
|
|
154
|
-
|
|
155
|
-
**Example:**
|
|
156
|
-
|
|
157
|
-
```json
|
|
158
|
-
{
|
|
159
|
-
"recipientId": "1234567890",
|
|
160
|
-
"videoUrl": "https://example.com/video.mp4",
|
|
161
|
-
"isReusable": false
|
|
162
|
-
}
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
**API Endpoint:** `POST /me/messages`
|
|
166
|
-
|
|
167
|
-
**Constraints:**
|
|
168
|
-
- Must be HTTPS
|
|
169
|
-
- Max file size: 25MB
|
|
170
|
-
- Supported formats: MP4, MOV
|
|
171
|
-
- Max duration: 60 seconds
|
|
172
|
-
- Aspect ratio: 16:9 or 9:16 recommended
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
#### Send Button Template
|
|
177
|
-
|
|
178
|
-
Send an interactive button template message.
|
|
179
|
-
|
|
180
|
-
**Parameters:**
|
|
181
|
-
|
|
182
|
-
| Parameter | Type | Required | Description |
|
|
183
|
-
|-----------|------|----------|-------------|
|
|
184
|
-
| Recipient ID | string | Yes | Instagram-scoped user ID |
|
|
185
|
-
| Message Text | string | Yes | Text to display (max 640 characters) |
|
|
186
|
-
| Buttons | array | Yes | Array of buttons (max 3) |
|
|
187
|
-
|
|
188
|
-
**Button Types:**
|
|
189
|
-
|
|
190
|
-
**Web URL Button:**
|
|
191
|
-
```json
|
|
192
|
-
{
|
|
193
|
-
"type": "web_url",
|
|
194
|
-
"title": "Visit Website",
|
|
195
|
-
"url": "https://example.com"
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
**Postback Button:**
|
|
200
|
-
```json
|
|
201
|
-
{
|
|
202
|
-
"type": "postback",
|
|
203
|
-
"title": "Get Started",
|
|
204
|
-
"payload": "GET_STARTED_PAYLOAD"
|
|
205
|
-
}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Complete Example:**
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"recipientId": "1234567890",
|
|
213
|
-
"messageText": "How can we help you today?",
|
|
214
|
-
"buttons": [
|
|
215
|
-
{
|
|
216
|
-
"type": "web_url",
|
|
217
|
-
"title": "Visit Shop",
|
|
218
|
-
"url": "https://shop.example.com"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"type": "postback",
|
|
222
|
-
"title": "Contact Support",
|
|
223
|
-
"payload": "CONTACT_SUPPORT"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"type": "postback",
|
|
227
|
-
"title": "Track Order",
|
|
228
|
-
"payload": "TRACK_ORDER"
|
|
229
|
-
}
|
|
230
|
-
]
|
|
231
|
-
}
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
**API Endpoint:** `POST /me/messages`
|
|
235
|
-
|
|
236
|
-
**Constraints:**
|
|
237
|
-
- Max 3 buttons per template
|
|
238
|
-
- Button title: Max 20 characters
|
|
239
|
-
- Postback payload: Max 1000 characters
|
|
240
|
-
- URLs must be HTTPS
|
|
241
|
-
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
#### Send Generic Template
|
|
245
|
-
|
|
246
|
-
Send a carousel of cards with images and buttons.
|
|
247
|
-
|
|
248
|
-
**Parameters:**
|
|
249
|
-
|
|
250
|
-
| Parameter | Type | Required | Description |
|
|
251
|
-
|-----------|------|----------|-------------|
|
|
252
|
-
| Recipient ID | string | Yes | Instagram-scoped user ID |
|
|
253
|
-
| Elements | array | Yes | Array of template elements (max 10) |
|
|
254
|
-
|
|
255
|
-
**Element Structure:**
|
|
256
|
-
|
|
257
|
-
```json
|
|
258
|
-
{
|
|
259
|
-
"title": "Product Name",
|
|
260
|
-
"subtitle": "Product description",
|
|
261
|
-
"image_url": "https://example.com/product.jpg",
|
|
262
|
-
"default_action": {
|
|
263
|
-
"type": "web_url",
|
|
264
|
-
"url": "https://example.com/product"
|
|
265
|
-
},
|
|
266
|
-
"buttons": [
|
|
267
|
-
{
|
|
268
|
-
"type": "web_url",
|
|
269
|
-
"title": "Buy Now",
|
|
270
|
-
"url": "https://example.com/buy"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"type": "postback",
|
|
274
|
-
"title": "Add to Cart",
|
|
275
|
-
"payload": "ADD_TO_CART_123"
|
|
276
|
-
}
|
|
277
|
-
]
|
|
278
|
-
}
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
**Complete Example:**
|
|
282
|
-
|
|
283
|
-
```json
|
|
284
|
-
{
|
|
285
|
-
"recipientId": "1234567890",
|
|
286
|
-
"elements": [
|
|
287
|
-
{
|
|
288
|
-
"title": "Summer Collection",
|
|
289
|
-
"subtitle": "New arrivals for summer 2025",
|
|
290
|
-
"image_url": "https://example.com/summer.jpg",
|
|
291
|
-
"buttons": [
|
|
292
|
-
{
|
|
293
|
-
"type": "web_url",
|
|
294
|
-
"title": "Shop Now",
|
|
295
|
-
"url": "https://shop.example.com/summer"
|
|
296
|
-
}
|
|
297
|
-
]
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"title": "Winter Sale",
|
|
301
|
-
"subtitle": "Up to 50% off",
|
|
302
|
-
"image_url": "https://example.com/winter.jpg",
|
|
303
|
-
"buttons": [
|
|
304
|
-
{
|
|
305
|
-
"type": "web_url",
|
|
306
|
-
"title": "View Deals",
|
|
307
|
-
"url": "https://shop.example.com/winter"
|
|
308
|
-
}
|
|
309
|
-
]
|
|
310
|
-
}
|
|
311
|
-
]
|
|
312
|
-
}
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
**Constraints:**
|
|
316
|
-
- Max 10 elements (cards)
|
|
317
|
-
- Title: Max 80 characters
|
|
318
|
-
- Subtitle: Max 80 characters
|
|
319
|
-
- Max 3 buttons per element
|
|
320
|
-
- Image aspect ratio: 1.91:1 recommended
|
|
321
|
-
- Image size: Min 600x315 pixels
|
|
322
|
-
|
|
323
|
-
---
|
|
324
|
-
|
|
325
|
-
#### Send Quick Replies
|
|
326
|
-
|
|
327
|
-
Send a message with quick reply options.
|
|
328
|
-
|
|
329
|
-
**Parameters:**
|
|
330
|
-
|
|
331
|
-
| Parameter | Type | Required | Description |
|
|
332
|
-
|-----------|------|----------|-------------|
|
|
333
|
-
| Recipient ID | string | Yes | Instagram-scoped user ID |
|
|
334
|
-
| Message Text | string | Yes | Text message content |
|
|
335
|
-
| Quick Replies | array | Yes | Array of quick reply options (max 13) |
|
|
336
|
-
|
|
337
|
-
**Quick Reply Structure:**
|
|
338
|
-
|
|
339
|
-
```json
|
|
340
|
-
{
|
|
341
|
-
"content_type": "text",
|
|
342
|
-
"title": "Option 1",
|
|
343
|
-
"payload": "OPTION_1_PAYLOAD",
|
|
344
|
-
"image_url": "https://example.com/icon.png"
|
|
345
|
-
}
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
**Complete Example:**
|
|
349
|
-
|
|
350
|
-
```json
|
|
351
|
-
{
|
|
352
|
-
"recipientId": "1234567890",
|
|
353
|
-
"messageText": "What's your favorite color?",
|
|
354
|
-
"quickReplies": [
|
|
355
|
-
{
|
|
356
|
-
"content_type": "text",
|
|
357
|
-
"title": "Red",
|
|
358
|
-
"payload": "COLOR_RED"
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"content_type": "text",
|
|
362
|
-
"title": "Blue",
|
|
363
|
-
"payload": "COLOR_BLUE"
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
"content_type": "text",
|
|
367
|
-
"title": "Green",
|
|
368
|
-
"payload": "COLOR_GREEN"
|
|
369
|
-
}
|
|
370
|
-
]
|
|
371
|
-
}
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
**Constraints:**
|
|
375
|
-
- Max 13 quick replies
|
|
376
|
-
- Title: Max 20 characters
|
|
377
|
-
- Payload: Max 1000 characters
|
|
378
|
-
- Image URL optional
|
|
379
|
-
|
|
380
|
-
---
|
|
381
|
-
|
|
382
|
-
#### Upload Media
|
|
383
|
-
|
|
384
|
-
Upload media for publishing to Instagram feed, reels, or stories.
|
|
385
|
-
|
|
386
|
-
**Parameters:**
|
|
387
|
-
|
|
388
|
-
| Parameter | Type | Required | Description |
|
|
389
|
-
|-----------|------|----------|-------------|
|
|
390
|
-
| Media Type | options | Yes | Type: image, video, reels, stories |
|
|
391
|
-
| Media URL | string | Yes | Public HTTPS URL of media file |
|
|
392
|
-
| Caption | string | No | Caption for the media post |
|
|
393
|
-
|
|
394
|
-
**Example:**
|
|
395
|
-
|
|
396
|
-
```json
|
|
397
|
-
{
|
|
398
|
-
"mediaType": "image",
|
|
399
|
-
"mediaUrl": "https://example.com/photo.jpg",
|
|
400
|
-
"caption": "Check out our new product! #Launch"
|
|
401
|
-
}
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
**API Endpoint:** `POST /{ig-user-id}/media` (container creation)
|
|
405
|
-
**Publish Endpoint:** `POST /{ig-user-id}/media_publish`
|
|
406
|
-
|
|
407
|
-
**Process:**
|
|
408
|
-
1. Create media container
|
|
409
|
-
2. Wait for processing
|
|
410
|
-
3. Publish container
|
|
411
|
-
|
|
412
|
-
**Constraints:**
|
|
413
|
-
- **Images**: JPG/PNG, max 8MB, min 320px
|
|
414
|
-
- **Videos**: MP4/MOV, max 100MB, 3-60 seconds
|
|
415
|
-
- **Reels**: 9:16 aspect ratio, max 90 seconds
|
|
416
|
-
- **Stories**: 9:16 aspect ratio, 24-hour duration
|
|
417
|
-
|
|
418
|
-
---
|
|
419
|
-
|
|
420
|
-
### Comment Operations
|
|
421
|
-
|
|
422
|
-
#### Get Comments
|
|
423
|
-
|
|
424
|
-
Retrieve all comments on a specific Instagram media post.
|
|
425
|
-
|
|
426
|
-
**Parameters:**
|
|
427
|
-
|
|
428
|
-
| Parameter | Type | Required | Description |
|
|
429
|
-
|-----------|------|----------|-------------|
|
|
430
|
-
| Media ID | string | Yes | ID of the Instagram media post |
|
|
431
|
-
| Return All | boolean | No | Retrieve all comments (default: false) |
|
|
432
|
-
| Limit | number | No | Maximum number of comments to return (default: 50) |
|
|
433
|
-
|
|
434
|
-
**Example:**
|
|
435
|
-
|
|
436
|
-
```json
|
|
437
|
-
{
|
|
438
|
-
"mediaId": "17895695668004550",
|
|
439
|
-
"returnAll": false,
|
|
440
|
-
"limit": 20
|
|
441
|
-
}
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
**API Endpoint:** `GET /{media-id}/comments?fields=id,text,username,timestamp,like_count,replies_count`
|
|
445
|
-
|
|
446
|
-
**Response:**
|
|
447
|
-
```json
|
|
448
|
-
{
|
|
449
|
-
"data": [
|
|
450
|
-
{
|
|
451
|
-
"id": "17858391726040854",
|
|
452
|
-
"text": "Great post!",
|
|
453
|
-
"username": "follower123",
|
|
454
|
-
"timestamp": "2024-01-15T10:30:00+0000",
|
|
455
|
-
"like_count": 5,
|
|
456
|
-
"replies_count": 2
|
|
457
|
-
}
|
|
458
|
-
],
|
|
459
|
-
"paging": {
|
|
460
|
-
"cursors": {
|
|
461
|
-
"after": "cursor_token"
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
---
|
|
468
|
-
|
|
469
|
-
#### Get Replies
|
|
470
|
-
|
|
471
|
-
Retrieve replies to a specific comment.
|
|
472
|
-
|
|
473
|
-
**Parameters:**
|
|
474
|
-
|
|
475
|
-
| Parameter | Type | Required | Description |
|
|
476
|
-
|-----------|------|----------|-------------|
|
|
477
|
-
| Comment ID | string | Yes | ID of the parent comment |
|
|
478
|
-
| Return All | boolean | No | Retrieve all replies (default: false) |
|
|
479
|
-
| Limit | number | No | Maximum number of replies to return (default: 50) |
|
|
480
|
-
|
|
481
|
-
**Example:**
|
|
482
|
-
|
|
483
|
-
```json
|
|
484
|
-
{
|
|
485
|
-
"commentId": "17858391726040854",
|
|
486
|
-
"returnAll": false,
|
|
487
|
-
"limit": 10
|
|
488
|
-
}
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
**API Endpoint:** `GET /{comment-id}/replies?fields=id,text,username,timestamp,like_count`
|
|
492
|
-
|
|
493
|
-
**Response:**
|
|
494
|
-
```json
|
|
495
|
-
{
|
|
496
|
-
"data": [
|
|
497
|
-
{
|
|
498
|
-
"id": "17899876543210123",
|
|
499
|
-
"text": "Thanks for your support!",
|
|
500
|
-
"username": "youraccount",
|
|
501
|
-
"timestamp": "2024-01-15T11:00:00+0000",
|
|
502
|
-
"like_count": 2
|
|
503
|
-
}
|
|
504
|
-
]
|
|
505
|
-
}
|
|
506
|
-
```
|
|
507
|
-
|
|
508
|
-
---
|
|
509
|
-
|
|
510
|
-
#### Reply to Comment
|
|
511
|
-
|
|
512
|
-
Post a public reply to a comment on your media.
|
|
513
|
-
|
|
514
|
-
**Parameters:**
|
|
515
|
-
|
|
516
|
-
| Parameter | Type | Required | Description |
|
|
517
|
-
|-----------|------|----------|-------------|
|
|
518
|
-
| Comment ID | string | Yes | ID of the comment to reply to |
|
|
519
|
-
| Reply Text | string | Yes | Text of your reply (max 8000 characters) |
|
|
520
|
-
|
|
521
|
-
**Example:**
|
|
522
|
-
|
|
523
|
-
```json
|
|
524
|
-
{
|
|
525
|
-
"commentId": "17858391726040854",
|
|
526
|
-
"replyText": "Thanks for your feedback! 🙌"
|
|
527
|
-
}
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
**API Endpoint:** `POST /{comment-id}/replies`
|
|
531
|
-
|
|
532
|
-
**Request Body:**
|
|
533
|
-
```json
|
|
534
|
-
{
|
|
535
|
-
"message": "Thanks for your feedback! 🙌"
|
|
536
|
-
}
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
**Response:**
|
|
540
|
-
```json
|
|
541
|
-
{
|
|
542
|
-
"id": "17899876543210456"
|
|
543
|
-
}
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
**Constraints:**
|
|
547
|
-
- Reply text max length: 8000 characters
|
|
548
|
-
- Must be replying to a comment on your own media
|
|
549
|
-
- Supports @mentions (auto-tagging)
|
|
550
|
-
|
|
551
|
-
---
|
|
552
|
-
|
|
553
|
-
#### Send Private Reply
|
|
554
|
-
|
|
555
|
-
Send a Direct Message to a user who commented on your media. This is the "Private Reply" feature available within the 7-day messaging window.
|
|
556
|
-
|
|
557
|
-
**Parameters:**
|
|
558
|
-
|
|
559
|
-
| Parameter | Type | Required | Description |
|
|
560
|
-
|-----------|------|----------|-------------|
|
|
561
|
-
| Comment ID | string | Yes | ID of the comment from the user |
|
|
562
|
-
| Message Text | string | Yes | Text message to send privately |
|
|
563
|
-
|
|
564
|
-
**Example:**
|
|
565
|
-
|
|
566
|
-
```json
|
|
567
|
-
{
|
|
568
|
-
"commentId": "17858391726040854",
|
|
569
|
-
"messageText": "Hey! Thanks for your comment. Here's an exclusive discount code: SAVE20"
|
|
570
|
-
}
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
**API Endpoint:** `POST /me/messages`
|
|
574
|
-
|
|
575
|
-
**Request Body:**
|
|
576
|
-
```json
|
|
577
|
-
{
|
|
578
|
-
"recipient": {
|
|
579
|
-
"comment_id": "17858391726040854"
|
|
580
|
-
},
|
|
581
|
-
"message": {
|
|
582
|
-
"text": "Hey! Thanks for your comment. Here's an exclusive discount code: SAVE20"
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
**Response:**
|
|
588
|
-
```json
|
|
589
|
-
{
|
|
590
|
-
"recipient_id": "1234567890",
|
|
591
|
-
"message_id": "mid.xyz789"
|
|
592
|
-
}
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
**Important Notes:**
|
|
596
|
-
- ⏰ **7-Day Window**: Private replies must be sent within 7 days of the comment
|
|
597
|
-
- 🔒 **First Contact**: This can initiate a DM conversation with users who haven't messaged you
|
|
598
|
-
- 📌 **Use Case**: Perfect for sending promotional codes, exclusive offers, or private information
|
|
599
|
-
- ⚠️ **Limitations**: Only works for comments on your own media posts
|
|
600
|
-
|
|
601
|
-
---
|
|
602
|
-
|
|
603
|
-
#### Delete Comment
|
|
604
|
-
|
|
605
|
-
Delete a comment from your media post.
|
|
606
|
-
|
|
607
|
-
**Parameters:**
|
|
608
|
-
|
|
609
|
-
| Parameter | Type | Required | Description |
|
|
610
|
-
|-----------|------|----------|-------------|
|
|
611
|
-
| Comment ID | string | Yes | ID of the comment to delete |
|
|
612
|
-
|
|
613
|
-
**Example:**
|
|
614
|
-
|
|
615
|
-
```json
|
|
616
|
-
{
|
|
617
|
-
"commentId": "17858391726040854"
|
|
618
|
-
}
|
|
619
|
-
```
|
|
620
|
-
|
|
621
|
-
**API Endpoint:** `DELETE /{comment-id}`
|
|
622
|
-
|
|
623
|
-
**Response:**
|
|
624
|
-
```json
|
|
625
|
-
{
|
|
626
|
-
"success": true
|
|
627
|
-
}
|
|
628
|
-
```
|
|
629
|
-
|
|
630
|
-
**Notes:**
|
|
631
|
-
- Can only delete comments on your own media
|
|
632
|
-
- Can delete your own replies on any post
|
|
633
|
-
- Deletion is permanent and cannot be undone
|
|
634
|
-
|
|
635
|
-
---
|
|
636
|
-
|
|
637
|
-
#### Hide/Unhide Comment
|
|
638
|
-
|
|
639
|
-
Toggle the visibility of a comment. Hidden comments are not visible to the public but remain in your moderation queue.
|
|
640
|
-
|
|
641
|
-
**Parameters:**
|
|
642
|
-
|
|
643
|
-
| Parameter | Type | Required | Description |
|
|
644
|
-
|-----------|------|----------|-------------|
|
|
645
|
-
| Comment ID | string | Yes | ID of the comment to hide/unhide |
|
|
646
|
-
| Hide | boolean | Yes | true to hide, false to unhide |
|
|
647
|
-
|
|
648
|
-
**Example:**
|
|
649
|
-
|
|
650
|
-
```json
|
|
651
|
-
{
|
|
652
|
-
"commentId": "17858391726040854",
|
|
653
|
-
"hide": true
|
|
654
|
-
}
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
**API Endpoint:** `POST /{comment-id}`
|
|
658
|
-
|
|
659
|
-
**Request Body:**
|
|
660
|
-
```json
|
|
661
|
-
{
|
|
662
|
-
"hide": true
|
|
663
|
-
}
|
|
664
|
-
```
|
|
665
|
-
|
|
666
|
-
**Response:**
|
|
667
|
-
```json
|
|
668
|
-
{
|
|
669
|
-
"success": true
|
|
670
|
-
}
|
|
671
|
-
```
|
|
672
|
-
|
|
673
|
-
**Notes:**
|
|
674
|
-
- Hidden comments are still accessible via the API
|
|
675
|
-
- Useful for moderation without permanent deletion
|
|
676
|
-
- Users are not notified when their comment is hidden
|
|
677
|
-
|
|
678
|
-
---
|
|
679
|
-
|
|
680
|
-
### User Operations
|
|
681
|
-
|
|
682
|
-
#### Get User Profile
|
|
683
|
-
|
|
684
|
-
Retrieve Instagram user profile information.
|
|
685
|
-
|
|
686
|
-
**Parameters:**
|
|
687
|
-
|
|
688
|
-
| Parameter | Type | Required | Description |
|
|
689
|
-
|-----------|------|----------|-------------|
|
|
690
|
-
| User ID | string | Yes | Instagram-scoped user ID (IGSID) |
|
|
691
|
-
| Fields | multi-options | No | Fields to retrieve (default: all) |
|
|
692
|
-
|
|
693
|
-
**Available Fields:**
|
|
694
|
-
- `id` - User's Instagram-scoped ID
|
|
695
|
-
- `name` - User's full name
|
|
696
|
-
- `username` - Instagram username
|
|
697
|
-
- `profile_pic` - Profile picture URL
|
|
698
|
-
|
|
699
|
-
**Example:**
|
|
700
|
-
|
|
701
|
-
```json
|
|
702
|
-
{
|
|
703
|
-
"userId": "1234567890",
|
|
704
|
-
"fields": ["id", "name", "username", "profile_pic"]
|
|
705
|
-
}
|
|
706
|
-
```
|
|
707
|
-
|
|
708
|
-
**API Endpoint:** `GET /{ig-user-id}?fields=...`
|
|
709
|
-
|
|
710
|
-
**Response:**
|
|
711
|
-
```json
|
|
712
|
-
{
|
|
713
|
-
"id": "1234567890",
|
|
714
|
-
"name": "John Doe",
|
|
715
|
-
"username": "johndoe",
|
|
716
|
-
"profile_pic": "https://scontent.cdninstagram.com/..."
|
|
717
|
-
}
|
|
718
|
-
```
|
|
719
|
-
|
|
720
|
-
---
|
|
721
|
-
|
|
722
|
-
## Instagram Trigger Node
|
|
723
|
-
|
|
724
|
-
Webhook-based trigger for Instagram events.
|
|
725
|
-
|
|
726
|
-
### Webhook Events
|
|
727
|
-
|
|
728
|
-
#### Messages
|
|
729
|
-
|
|
730
|
-
Triggered when a user sends a message to your Instagram Business Account.
|
|
731
|
-
|
|
732
|
-
**Event Data:**
|
|
733
|
-
|
|
734
|
-
```json
|
|
735
|
-
{
|
|
736
|
-
"eventType": "message",
|
|
737
|
-
"senderId": "1234567890",
|
|
738
|
-
"recipientId": "0987654321",
|
|
739
|
-
"timestamp": 1696435200000,
|
|
740
|
-
"messageId": "mid.abc123",
|
|
741
|
-
"text": "Hello!",
|
|
742
|
-
"attachments": []
|
|
743
|
-
}
|
|
744
|
-
```
|
|
745
|
-
|
|
746
|
-
**Attachment Structure:**
|
|
747
|
-
|
|
748
|
-
```json
|
|
749
|
-
{
|
|
750
|
-
"type": "image",
|
|
751
|
-
"payload": {
|
|
752
|
-
"url": "https://scontent.cdninstagram.com/..."
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
```
|
|
756
|
-
|
|
757
|
-
**Quick Reply Response:**
|
|
758
|
-
|
|
759
|
-
```json
|
|
760
|
-
{
|
|
761
|
-
"eventType": "message",
|
|
762
|
-
"senderId": "1234567890",
|
|
763
|
-
"text": "Red",
|
|
764
|
-
"quick_reply": {
|
|
765
|
-
"payload": "COLOR_RED"
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
```
|
|
769
|
-
|
|
770
|
-
---
|
|
771
|
-
|
|
772
|
-
#### Postbacks
|
|
773
|
-
|
|
774
|
-
Triggered when a user clicks a button in a template.
|
|
775
|
-
|
|
776
|
-
**Event Data:**
|
|
777
|
-
|
|
778
|
-
```json
|
|
779
|
-
{
|
|
780
|
-
"eventType": "postback",
|
|
781
|
-
"senderId": "1234567890",
|
|
782
|
-
"recipientId": "0987654321",
|
|
783
|
-
"timestamp": 1696435200000,
|
|
784
|
-
"payload": "GET_STARTED",
|
|
785
|
-
"title": "Get Started"
|
|
786
|
-
}
|
|
787
|
-
```
|
|
788
|
-
|
|
789
|
-
---
|
|
790
|
-
|
|
791
|
-
#### Opt-ins
|
|
792
|
-
|
|
793
|
-
Triggered when a user grants permissions or subscribes.
|
|
794
|
-
|
|
795
|
-
**Event Data:**
|
|
796
|
-
|
|
797
|
-
```json
|
|
798
|
-
{
|
|
799
|
-
"eventType": "optin",
|
|
800
|
-
"senderId": "1234567890",
|
|
801
|
-
"recipientId": "0987654321",
|
|
802
|
-
"timestamp": 1696435200000,
|
|
803
|
-
"ref": "NEWSLETTER_SIGNUP"
|
|
804
|
-
}
|
|
805
|
-
```
|
|
806
|
-
|
|
807
|
-
---
|
|
808
|
-
|
|
809
|
-
## Error Codes
|
|
810
|
-
|
|
811
|
-
### Instagram API Errors
|
|
812
|
-
|
|
813
|
-
| Code | Type | Description | Solution |
|
|
814
|
-
|------|------|-------------|----------|
|
|
815
|
-
| 190 | OAuthException | Invalid access token | Re-authenticate or refresh token |
|
|
816
|
-
| 200 | PermissionsError | Permission denied | Request required permissions |
|
|
817
|
-
| 551 | APIException | User cannot receive messages | Wait for user to initiate conversation |
|
|
818
|
-
| 613 | APIException | Rate limit exceeded | Implement exponential backoff |
|
|
819
|
-
| 10 | OAuthException | Permission not granted | Check app permissions in Meta console |
|
|
820
|
-
| 100 | InvalidParameter | Invalid parameter | Verify request payload |
|
|
821
|
-
| 2 | APIException | Service temporarily unavailable | Retry after delay |
|
|
822
|
-
|
|
823
|
-
### n8n Node Errors
|
|
824
|
-
|
|
825
|
-
| Error | Description | Solution |
|
|
826
|
-
|-------|-------------|----------|
|
|
827
|
-
| Missing Credential | No credential selected | Select credential in node settings |
|
|
828
|
-
| Invalid Recipient ID | Recipient ID format invalid | Use Instagram-scoped ID (IGSID) |
|
|
829
|
-
| URL Not HTTPS | Media URL not secure | Use HTTPS URLs only |
|
|
830
|
-
| Webhook Verification Failed | Verify token mismatch | Check token in credential matches Meta app |
|
|
831
|
-
|
|
832
|
-
---
|
|
833
|
-
|
|
834
|
-
## Rate Limits
|
|
835
|
-
|
|
836
|
-
### API Rate Limits
|
|
837
|
-
|
|
838
|
-
| Endpoint | Limit | Window |
|
|
839
|
-
|----------|-------|--------|
|
|
840
|
-
| Messaging API | 200 calls | Per hour per user |
|
|
841
|
-
| Media Upload | 50 calls | Per hour per user |
|
|
842
|
-
| User Profile | 200 calls | Per hour per app |
|
|
843
|
-
|
|
844
|
-
### Webhook Limits
|
|
845
|
-
|
|
846
|
-
- **Events**: Unlimited receives
|
|
847
|
-
- **Response Time**: Must respond within 20 seconds
|
|
848
|
-
- **Batch Size**: Up to 1000 events per batch
|
|
849
|
-
- **Retry**: 3 attempts with exponential backoff
|
|
850
|
-
|
|
851
|
-
### Best Practices
|
|
852
|
-
|
|
853
|
-
1. **Implement Retry Logic**: Use exponential backoff for failed requests
|
|
854
|
-
2. **Cache Data**: Store user profiles to reduce API calls
|
|
855
|
-
3. **Batch Operations**: Group operations when possible
|
|
856
|
-
4. **Monitor Usage**: Track API call consumption
|
|
857
|
-
5. **Handle Errors**: Gracefully handle rate limit responses
|
|
858
|
-
|
|
859
|
-
### Rate Limit Headers
|
|
860
|
-
|
|
861
|
-
```
|
|
862
|
-
X-Business-Use-Case-Usage: {"business_id":{"call_count":15,"total_cputime":25,"total_time":25}}
|
|
863
|
-
X-App-Usage: {"call_count":15,"total_cputime":25,"total_time":25}
|
|
864
|
-
```
|
|
865
|
-
|
|
866
|
-
**Response When Exceeded:**
|
|
867
|
-
|
|
868
|
-
```json
|
|
869
|
-
{
|
|
870
|
-
"error": {
|
|
871
|
-
"message": "Application request limit reached",
|
|
872
|
-
"type": "OAuthException",
|
|
873
|
-
"code": 4,
|
|
874
|
-
"fbtrace_id": "..."
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
```
|
|
878
|
-
|
|
879
|
-
**Recommended Retry Delay:**
|
|
880
|
-
- 1st retry: 1 second
|
|
881
|
-
- 2nd retry: 2 seconds
|
|
882
|
-
- 3rd retry: 4 seconds
|
|
883
|
-
- 4th retry: 8 seconds
|
|
884
|
-
- Max retries: 5
|
|
885
|
-
|
|
886
|
-
---
|
|
887
|
-
|
|
888
|
-
## Additional Resources
|
|
889
|
-
|
|
890
|
-
### Instagram Graph API
|
|
891
|
-
- [Official Documentation](https://developers.facebook.com/docs/instagram-api)
|
|
892
|
-
- [Messaging API Reference](https://developers.facebook.com/docs/messenger-platform/instagram)
|
|
893
|
-
- [Webhook Reference](https://developers.facebook.com/docs/graph-api/webhooks)
|
|
894
|
-
|
|
895
|
-
### Testing Tools
|
|
896
|
-
- [Graph API Explorer](https://developers.facebook.com/tools/explorer/)
|
|
897
|
-
- [Access Token Debugger](https://developers.facebook.com/tools/debug/accesstoken/)
|
|
898
|
-
- [Webhook Tester](https://developers.facebook.com/tools/webhooks/)
|
|
899
|
-
|
|
900
|
-
### Support
|
|
901
|
-
- 💬 [n8n Community](https://community.n8n.io)
|
|
902
|
-
|
|
903
|
-
---
|
|
904
|
-
|
|
905
|
-
**Last Updated:** January 2025
|
|
906
|
-
**API Version:** Instagram Graph API v23.0
|
|
907
|
-
**Package Version:** 1.6.0
|