nodejs-insta-private-api-mqtt 1.3.64 → 1.3.65
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/dist/constants/index.js +12 -1
- package/dist/core/client.js +64 -46
- package/dist/core/request.js +70 -29
- package/dist/core/state.js +21 -4
- package/dist/fbns/fbns.client.js +0 -1
- package/dist/repositories/account.repository.js +7 -12
- package/dist/repositories/close-friends.repository.js +0 -1
- package/dist/repositories/collection.repository.js +0 -3
- package/dist/repositories/direct-thread.repository.js +0 -11
- package/dist/repositories/direct.repository.js +0 -1
- package/dist/repositories/feed.repository.js +0 -1
- package/dist/repositories/friendship.repository.js +0 -10
- package/dist/repositories/hashtag.repository.js +0 -2
- package/dist/repositories/highlights.repository.js +0 -6
- package/dist/repositories/media.repository.js +0 -18
- package/dist/repositories/news.repository.js +0 -1
- package/dist/repositories/story.repository.js +0 -1
- package/dist/repositories/upload.repository.js +0 -1
- package/dist/repositories/user.repository.js +0 -5
- package/dist/services/live.service.js +0 -8
- package/dist/services/search.service.js +0 -1
- package/package.json +1 -1
package/dist/constants/index.js
CHANGED
|
@@ -12,7 +12,17 @@ const LOGIN_EXPERIMENTS = 'ig_android_fci_onboarding_friend_search,ig_android_de
|
|
|
12
12
|
const FACEBOOK_ANALYTICS_APPLICATION_ID = '567067343352427';
|
|
13
13
|
const FACEBOOK_OTA_FIELDS = 'update%7Bdownload_uri%2Cdownload_uri_delta_base%2Cversion_code_delta_base%2Cdownload_uri_delta%2Cfallback_to_full_update%2Cfile_size_delta%2Cversion_code%2Cpublished_date%2Cfile_size%2Cota_bundle_type%2Cresources_checksum%2Callowed_networks%2Crelease_id%7D';
|
|
14
14
|
const FACEBOOK_ORCA_APPLICATION_ID = '124024574287414';
|
|
15
|
-
const BLOKS_VERSION_ID = '
|
|
15
|
+
const BLOKS_VERSION_ID = 'ce555e5500576acd8e84a66018f54a05720f2dce29f0bb5a1f97f0c10d6fac48';
|
|
16
|
+
|
|
17
|
+
const SUPPORTED_CAPABILITIES = [
|
|
18
|
+
{
|
|
19
|
+
value: '119.0,120.0,121.0,122.0,123.0,124.0,125.0,126.0,127.0,128.0,129.0,130.0,131.0,132.0,133.0,134.0,135.0,136.0,137.0,138.0,139.0,140.0,141.0,142.0',
|
|
20
|
+
name: 'SUPPORTED_SDK_VERSIONS',
|
|
21
|
+
},
|
|
22
|
+
{ value: '14', name: 'FACE_TRACKER_VERSION' },
|
|
23
|
+
{ value: 'ETC2_COMPRESSION', name: 'COMPRESSION' },
|
|
24
|
+
{ value: 'gyroscope_enabled', name: 'gyroscope' },
|
|
25
|
+
];
|
|
16
26
|
const HOSTNAME = 'i.instagram.com';
|
|
17
27
|
const WEB_HOSTNAME = 'www.instagram.com';
|
|
18
28
|
const HOST = `https://${HOSTNAME}/`;
|
|
@@ -33,6 +43,7 @@ module.exports = {
|
|
|
33
43
|
FACEBOOK_OTA_FIELDS,
|
|
34
44
|
FACEBOOK_ORCA_APPLICATION_ID,
|
|
35
45
|
BLOKS_VERSION_ID,
|
|
46
|
+
SUPPORTED_CAPABILITIES,
|
|
36
47
|
HOSTNAME,
|
|
37
48
|
WEB_HOSTNAME,
|
|
38
49
|
HOST,
|
package/dist/core/client.js
CHANGED
|
@@ -78,16 +78,19 @@ class IgApiClient extends EventEmitter {
|
|
|
78
78
|
* NOTE: removed automatic realtime connection attempt.
|
|
79
79
|
*/
|
|
80
80
|
async login(credentials) {
|
|
81
|
-
// ANTI-BOT: Automatically simulate app launch if not already done recently
|
|
82
81
|
if (this.state.deviceId) {
|
|
83
|
-
try {
|
|
84
|
-
await this.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
82
|
+
try {
|
|
83
|
+
await this.preLoginFlow();
|
|
84
|
+
} catch (e) {
|
|
85
|
+
if (this.state.verbose) console.warn('[Pre-Login] Flow error (non-fatal):', e.message);
|
|
86
|
+
}
|
|
89
87
|
}
|
|
90
88
|
const result = await this.account.login(credentials);
|
|
89
|
+
try {
|
|
90
|
+
await this.postLoginFlow();
|
|
91
|
+
} catch (e) {
|
|
92
|
+
if (this.state.verbose) console.warn('[Post-Login] Flow error (non-fatal):', e.message);
|
|
93
|
+
}
|
|
91
94
|
return result;
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -173,68 +176,83 @@ class IgApiClient extends EventEmitter {
|
|
|
173
176
|
// === UTILITY HELPER METHODS
|
|
174
177
|
// -------------------------------
|
|
175
178
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
* This should be called BEFORE login to establish the device's presence as a legitimate app instance.
|
|
179
|
-
*/
|
|
180
|
-
async simulateAppStart() {
|
|
181
|
-
if (this.state.verbose) console.log('[Anti-Bot] Starting Android App Launch Simulation...');
|
|
182
|
-
|
|
183
|
-
// 1. Emulate Launcher Sync (Fetching app configuration)
|
|
184
|
-
// This tells Instagram "I am opening the app and checking for feature flags"
|
|
179
|
+
async preLoginFlow() {
|
|
180
|
+
if (this.state.verbose) console.log('[Pre-Login] Starting pre-login flow (sync_launcher)...');
|
|
185
181
|
try {
|
|
186
182
|
await this.request.send({
|
|
187
183
|
url: '/api/v1/launcher/sync/',
|
|
188
184
|
method: 'POST',
|
|
189
|
-
form: {
|
|
190
|
-
configs: 'ig_android_launcher_sync_config',
|
|
185
|
+
form: this.request.sign({
|
|
191
186
|
id: this.state.uuid,
|
|
192
|
-
|
|
187
|
+
server_config_retrieval: '1',
|
|
188
|
+
}),
|
|
193
189
|
});
|
|
194
|
-
if (this.state.verbose) console.log('[
|
|
190
|
+
if (this.state.verbose) console.log('[Pre-Login] Launcher Sync: OK');
|
|
195
191
|
} catch (e) {
|
|
196
|
-
if (this.state.verbose) console.warn('[
|
|
192
|
+
if (this.state.verbose) console.warn('[Pre-Login] Launcher Sync Failed (non-fatal):', e.message);
|
|
197
193
|
}
|
|
194
|
+
await new Promise(resolve => setTimeout(resolve, Math.random() * 700 + 175));
|
|
195
|
+
}
|
|
198
196
|
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
async postLoginFlow() {
|
|
198
|
+
if (this.state.verbose) console.log('[Post-Login] Starting post-login flow...');
|
|
201
199
|
try {
|
|
202
200
|
await this.request.send({
|
|
203
|
-
url: '/api/v1/
|
|
201
|
+
url: '/api/v1/feed/reels_tray/',
|
|
204
202
|
method: 'POST',
|
|
205
|
-
form: {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
form: this.request.sign({
|
|
204
|
+
supported_capabilities_new: JSON.stringify(this.state.constants.SUPPORTED_CAPABILITIES),
|
|
205
|
+
reason: 'cold_start',
|
|
206
|
+
timezone_offset: String(this.state.timezoneOffset),
|
|
207
|
+
tray_session_id: this.state.traySessionId,
|
|
208
|
+
request_id: this.state.requestId,
|
|
209
|
+
_uuid: this.state.uuid,
|
|
210
|
+
page_size: 50,
|
|
211
|
+
reel_tray_impressions: {},
|
|
212
|
+
}),
|
|
209
213
|
});
|
|
210
|
-
if (this.state.verbose) console.log('[
|
|
214
|
+
if (this.state.verbose) console.log('[Post-Login] Reels tray: OK');
|
|
211
215
|
} catch (e) {
|
|
212
|
-
if (this.state.verbose) console.warn('[
|
|
216
|
+
if (this.state.verbose) console.warn('[Post-Login] Reels tray failed (non-fatal):', e.message);
|
|
213
217
|
}
|
|
214
|
-
|
|
215
|
-
// 3. Log Attribution (App Launch Event)
|
|
216
|
-
// This is crucial. Real apps report "I have launched".
|
|
217
218
|
try {
|
|
219
|
+
const timelineData = JSON.stringify({
|
|
220
|
+
has_camera_permission: '1',
|
|
221
|
+
feed_view_info: '[]',
|
|
222
|
+
phone_id: this.state.phoneId,
|
|
223
|
+
reason: 'cold_start_fetch',
|
|
224
|
+
battery_level: 100,
|
|
225
|
+
timezone_offset: String(this.state.timezoneOffset),
|
|
226
|
+
device_id: this.state.uuid,
|
|
227
|
+
request_id: this.state.requestId,
|
|
228
|
+
_uuid: this.state.uuid,
|
|
229
|
+
is_charging: Math.random() > 0.5 ? 1 : 0,
|
|
230
|
+
is_dark_mode: 1,
|
|
231
|
+
will_sound_on: Math.random() > 0.5 ? 1 : 0,
|
|
232
|
+
session_id: this.state.clientSessionId,
|
|
233
|
+
bloks_versioning_id: this.state.bloksVersionId,
|
|
234
|
+
is_pull_to_refresh: '0',
|
|
235
|
+
});
|
|
218
236
|
await this.request.send({
|
|
219
|
-
url: '/api/v1/
|
|
237
|
+
url: '/api/v1/feed/timeline/',
|
|
220
238
|
method: 'POST',
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
239
|
+
data: timelineData,
|
|
240
|
+
headers: {
|
|
241
|
+
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
242
|
+
'X-Ads-Opt-Out': '0',
|
|
243
|
+
'X-DEVICE-ID': this.state.uuid,
|
|
244
|
+
'X-CM-Bandwidth-KBPS': '-1.000',
|
|
245
|
+
'X-CM-Latency': String(Math.floor(Math.random() * 5) + 1),
|
|
228
246
|
},
|
|
229
247
|
});
|
|
230
|
-
if (this.state.verbose) console.log('[
|
|
248
|
+
if (this.state.verbose) console.log('[Post-Login] Timeline feed: OK');
|
|
231
249
|
} catch (e) {
|
|
232
|
-
if (this.state.verbose) console.warn('[
|
|
250
|
+
if (this.state.verbose) console.warn('[Post-Login] Timeline feed failed (non-fatal):', e.message);
|
|
233
251
|
}
|
|
252
|
+
}
|
|
234
253
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
if (this.state.verbose) console.log('[Anti-Bot] App Simulation Complete. Ready to Login.');
|
|
254
|
+
async simulateAppStart() {
|
|
255
|
+
return this.preLoginFlow();
|
|
238
256
|
}
|
|
239
257
|
|
|
240
258
|
/**
|
package/dist/core/request.js
CHANGED
|
@@ -44,17 +44,13 @@ class Request {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
signature(data) {
|
|
47
|
-
return
|
|
48
|
-
.update(data)
|
|
49
|
-
.digest('hex');
|
|
47
|
+
return 'SIGNATURE';
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
sign(payload) {
|
|
53
51
|
const json = typeof payload === 'object' ? JSON.stringify(payload) : payload;
|
|
54
|
-
const signature = this.signature(json);
|
|
55
52
|
return {
|
|
56
|
-
|
|
57
|
-
signed_body: `${signature}.${json}`,
|
|
53
|
+
signed_body: `SIGNATURE.${json}`,
|
|
58
54
|
};
|
|
59
55
|
}
|
|
60
56
|
|
|
@@ -173,6 +169,14 @@ class Request {
|
|
|
173
169
|
if (headers['ig-set-password-encryption-pub-key']) {
|
|
174
170
|
this.client.state.passwordEncryptionPubKey = headers['ig-set-password-encryption-pub-key'];
|
|
175
171
|
}
|
|
172
|
+
const mid = headers['ig-set-x-mid'];
|
|
173
|
+
if (mid) {
|
|
174
|
+
this.client.state.mid = mid;
|
|
175
|
+
}
|
|
176
|
+
const igURur = headers['ig-set-ig-u-rur'];
|
|
177
|
+
if (igURur) {
|
|
178
|
+
this.client.state.igURur = igURur;
|
|
179
|
+
}
|
|
176
180
|
|
|
177
181
|
// Update cookies from Set-Cookie headers (if cookieJar is available)
|
|
178
182
|
const setCookieHeaders = headers['set-cookie'] || headers['Set-Cookie'];
|
|
@@ -252,33 +256,70 @@ class Request {
|
|
|
252
256
|
}
|
|
253
257
|
|
|
254
258
|
getDefaultHeaders() {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
const state = this.client.state;
|
|
260
|
+
const locale = (state.locale || state.language || 'en_US').replace('-', '_');
|
|
261
|
+
const lang = locale.replace('_', '-');
|
|
262
|
+
const acceptLanguage = lang === 'en-US' ? 'en-US' : `${lang}, en-US`;
|
|
263
|
+
const userId = (() => {
|
|
264
|
+
try { return state.cookieUserId; } catch { return 0; }
|
|
265
|
+
})();
|
|
266
|
+
|
|
267
|
+
const headers = {
|
|
268
|
+
'X-IG-App-Locale': locale,
|
|
269
|
+
'X-IG-Device-Locale': locale,
|
|
270
|
+
'X-IG-Mapped-Locale': locale,
|
|
271
|
+
'X-Pigeon-Session-Id': `UFS-${state.pigeonSessionId}-1`,
|
|
261
272
|
'X-Pigeon-Rawclienttime': (Date.now() / 1000).toFixed(3),
|
|
262
|
-
'X-IG-
|
|
263
|
-
'X-IG-Bandwidth-
|
|
264
|
-
'X-IG-Bandwidth-
|
|
265
|
-
'X-IG-
|
|
266
|
-
'X-
|
|
267
|
-
'X-
|
|
268
|
-
'X-
|
|
269
|
-
'X-Bloks-Is-
|
|
270
|
-
'X-IG-
|
|
271
|
-
'X-IG-
|
|
272
|
-
'X-IG-
|
|
273
|
-
'X-IG-
|
|
274
|
-
'X-IG-
|
|
275
|
-
'
|
|
276
|
-
'X-
|
|
277
|
-
'
|
|
278
|
-
'
|
|
273
|
+
'X-IG-Bandwidth-Speed-KBPS': (random(2500000, 3000000) / 1000).toFixed(3),
|
|
274
|
+
'X-IG-Bandwidth-TotalBytes-B': String(random(5000000, 90000000)),
|
|
275
|
+
'X-IG-Bandwidth-TotalTime-MS': String(random(2000, 9000)),
|
|
276
|
+
'X-IG-App-Startup-Country': (state.country || 'US').toUpperCase(),
|
|
277
|
+
'X-Bloks-Version-Id': state.bloksVersionId,
|
|
278
|
+
'X-IG-WWW-Claim': state.igWWWClaim || '0',
|
|
279
|
+
'X-Bloks-Is-Layout-RTL': 'false',
|
|
280
|
+
'X-Bloks-Is-Panorama-Enabled': 'true',
|
|
281
|
+
'X-IG-Device-ID': state.uuid,
|
|
282
|
+
'X-IG-Family-Device-ID': state.phoneId,
|
|
283
|
+
'X-IG-Android-ID': state.deviceId,
|
|
284
|
+
'X-IG-Timezone-Offset': String(state.timezoneOffset),
|
|
285
|
+
'X-IG-Connection-Type': state.connectionTypeHeader || 'WIFI',
|
|
286
|
+
'X-IG-Capabilities': state.capabilitiesHeader || '3brTvx0=',
|
|
287
|
+
'X-IG-App-ID': state.fbAnalyticsApplicationId,
|
|
288
|
+
'Priority': 'u=3',
|
|
289
|
+
'User-Agent': state.appUserAgent,
|
|
290
|
+
'Accept-Language': acceptLanguage,
|
|
291
|
+
'X-MID': state.mid || '',
|
|
279
292
|
'Accept-Encoding': 'gzip, deflate',
|
|
293
|
+
'Host': 'i.instagram.com',
|
|
294
|
+
'X-FB-HTTP-Engine': 'Liger',
|
|
280
295
|
'Connection': 'keep-alive',
|
|
296
|
+
'X-FB-Client-IP': 'True',
|
|
297
|
+
'X-FB-Server-Cluster': 'True',
|
|
298
|
+
'IG-INTENDED-USER-ID': String(userId || 0),
|
|
299
|
+
'X-IG-Nav-Chain': '9MV:self_profile:2,ProfileMediaTabFragment:self_profile:3,9Xf:self_following:4',
|
|
300
|
+
'X-IG-SALT-IDS': String(random(1061162222, 1061262222)),
|
|
281
301
|
};
|
|
302
|
+
|
|
303
|
+
if (state.authorization) {
|
|
304
|
+
headers['Authorization'] = state.authorization;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (userId && userId !== 0 && userId !== '0') {
|
|
308
|
+
const nextYear = Math.floor(Date.now() / 1000) + 31536000;
|
|
309
|
+
headers['IG-U-DS-USER-ID'] = String(userId);
|
|
310
|
+
headers['IG-U-IG-DIRECT-REGION-HINT'] = `LLA,${userId},${nextYear}:01f7bae7d8b131877d8e0ae1493252280d72f6d0d554447cb1dc9049b6b2c507c08605b7`;
|
|
311
|
+
headers['IG-U-SHBID'] = `12695,${userId},${nextYear}:01f778d9c9f7546cf3722578fbf9b85143cd6e5132723e5c93f40f55ca0459c8ef8a0d9f`;
|
|
312
|
+
headers['IG-U-SHBTS'] = `${Math.floor(Date.now() / 1000)},${userId},${nextYear}:01f7ace11925d0388080078d0282b75b8059844855da27e23c90a362270fddfb3fae7e28`;
|
|
313
|
+
headers['IG-U-RUR'] = `RVA,${userId},${nextYear}:01f7f627f9ae4ce2874b2e04463efdb184340968b1b006fa88cb4cc69a942a04201e544c`;
|
|
314
|
+
}
|
|
315
|
+
if (state.igURur) {
|
|
316
|
+
headers['IG-U-RUR'] = state.igURur;
|
|
317
|
+
}
|
|
318
|
+
if (state.igWWWClaim) {
|
|
319
|
+
headers['X-IG-WWW-Claim'] = state.igWWWClaim;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
return headers;
|
|
282
323
|
}
|
|
283
324
|
}
|
|
284
325
|
|
package/dist/core/state.js
CHANGED
|
@@ -19,9 +19,10 @@ class State {
|
|
|
19
19
|
|
|
20
20
|
// basic defaults
|
|
21
21
|
this.language = 'en_US';
|
|
22
|
-
this.
|
|
22
|
+
this.locale = 'en_US';
|
|
23
|
+
this.timezoneOffset = new Date().getTimezoneOffset() * -60;
|
|
23
24
|
this.radioType = 'wifi-none';
|
|
24
|
-
this.capabilitiesHeader = '
|
|
25
|
+
this.capabilitiesHeader = '3brTvx0=';
|
|
25
26
|
this.connectionTypeHeader = 'WIFI';
|
|
26
27
|
this.isLayoutRTL = false;
|
|
27
28
|
this.adsOptOut = false;
|
|
@@ -33,6 +34,14 @@ class State {
|
|
|
33
34
|
this.pigeonSessionIdLifetime = 1200000;
|
|
34
35
|
this.parsedAuthorization = undefined;
|
|
35
36
|
|
|
37
|
+
this.mid = '';
|
|
38
|
+
this.country = 'US';
|
|
39
|
+
this.countryCode = 1;
|
|
40
|
+
this.igURur = '';
|
|
41
|
+
this.igWWWClaim = '0';
|
|
42
|
+
this.requestId = '';
|
|
43
|
+
this.traySessionId = '';
|
|
44
|
+
|
|
36
45
|
// ===== PLATFORM SUPPORT (iOS + Android) =====
|
|
37
46
|
this.platform = 'android'; // 'android' or 'ios'
|
|
38
47
|
this.iosVersion = '18.3';
|
|
@@ -281,13 +290,19 @@ class State {
|
|
|
281
290
|
build: this.build,
|
|
282
291
|
authorization: this.authorization,
|
|
283
292
|
igWWWClaim: this.igWWWClaim,
|
|
293
|
+
igURur: this.igURur,
|
|
294
|
+
mid: this.mid,
|
|
295
|
+
country: this.country,
|
|
296
|
+
countryCode: this.countryCode,
|
|
297
|
+
locale: this.locale,
|
|
284
298
|
passwordEncryptionKeyId: this.passwordEncryptionKeyId,
|
|
285
299
|
passwordEncryptionPubKey: this.passwordEncryptionPubKey,
|
|
286
|
-
// keep other runtime fields that may be present
|
|
287
300
|
language: this.language,
|
|
288
301
|
timezoneOffset: this.timezoneOffset,
|
|
289
302
|
connectionTypeHeader: this.connectionTypeHeader,
|
|
290
|
-
capabilitiesHeader: this.capabilitiesHeader
|
|
303
|
+
capabilitiesHeader: this.capabilitiesHeader,
|
|
304
|
+
requestId: this.requestId,
|
|
305
|
+
traySessionId: this.traySessionId
|
|
291
306
|
};
|
|
292
307
|
return obj;
|
|
293
308
|
}
|
|
@@ -395,6 +410,8 @@ class State {
|
|
|
395
410
|
this.phoneId = chance.guid();
|
|
396
411
|
this.adid = chance.guid();
|
|
397
412
|
this.build = 'UP1A.231005.007';
|
|
413
|
+
this.requestId = chance.guid();
|
|
414
|
+
this.traySessionId = chance.guid();
|
|
398
415
|
}
|
|
399
416
|
|
|
400
417
|
regenerateDevice(seed = 'instagram-private-api') {
|
package/dist/fbns/fbns.client.js
CHANGED
|
@@ -239,7 +239,6 @@ class FbnsClient extends eventemitter3_1.EventEmitter {
|
|
|
239
239
|
is_main_push_channel: true,
|
|
240
240
|
device_sub_type: 2,
|
|
241
241
|
device_token: token,
|
|
242
|
-
_csrftoken: this.ig.state.cookieCsrfToken,
|
|
243
242
|
guid: this.ig.state.uuid,
|
|
244
243
|
uuid: this.ig.state.uuid,
|
|
245
244
|
users: this.ig.state.cookieUserId,
|
|
@@ -68,21 +68,21 @@ class AccountRepository extends Repository {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return this.requestWithRetry(async () => {
|
|
71
|
+
const countryCode = this.client.state.countryCode || 1;
|
|
71
72
|
const response = await this.client.request.send({
|
|
72
73
|
method: 'POST',
|
|
73
74
|
url: '/api/v1/accounts/login/',
|
|
74
75
|
form: this.client.request.sign({
|
|
75
|
-
|
|
76
|
+
jazoest: AccountRepository.createJazoest(this.client.state.phoneId),
|
|
77
|
+
country_codes: JSON.stringify([{ country_code: String(countryCode), source: ['default'] }]),
|
|
78
|
+
phone_id: this.client.state.phoneId,
|
|
76
79
|
enc_password: `#PWD_INSTAGRAM:4:${time}:${encrypted}`,
|
|
80
|
+
username,
|
|
81
|
+
adid: this.client.state.adid,
|
|
77
82
|
guid: this.client.state.uuid,
|
|
78
|
-
phone_id: this.client.state.phoneId,
|
|
79
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
80
83
|
device_id: this.client.state.deviceId,
|
|
81
|
-
adid: this.client.state.adid,
|
|
82
84
|
google_tokens: '[]',
|
|
83
|
-
login_attempt_count: 0,
|
|
84
|
-
country_codes: JSON.stringify([{ country_code: '1', source: 'default' }]),
|
|
85
|
-
jazoest: AccountRepository.createJazoest(this.client.state.phoneId),
|
|
85
|
+
login_attempt_count: '0',
|
|
86
86
|
}),
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -98,7 +98,6 @@ class AccountRepository extends Repository {
|
|
|
98
98
|
url: '/api/v1/accounts/login_confirm/',
|
|
99
99
|
method: 'POST',
|
|
100
100
|
form: this.client.request.sign({
|
|
101
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
102
101
|
guid: this.client.state.uuid,
|
|
103
102
|
device_id: this.client.state.deviceId,
|
|
104
103
|
is_relogin: true,
|
|
@@ -136,7 +135,6 @@ class AccountRepository extends Repository {
|
|
|
136
135
|
method: 'POST',
|
|
137
136
|
url: '/api/v1/accounts/logout/',
|
|
138
137
|
form: this.client.request.sign({
|
|
139
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
140
138
|
_uuid: this.client.state.uuid,
|
|
141
139
|
}),
|
|
142
140
|
});
|
|
@@ -167,7 +165,6 @@ class AccountRepository extends Repository {
|
|
|
167
165
|
method: 'POST',
|
|
168
166
|
url: '/api/v1/qe/sync/',
|
|
169
167
|
form: this.client.request.sign({
|
|
170
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
171
168
|
id: this.client.state.uuid,
|
|
172
169
|
server_config_retrieval: '1',
|
|
173
170
|
experiments: this.client.state.constants.LOGIN_EXPERIMENTS,
|
|
@@ -244,7 +241,6 @@ class AccountRepository extends Repository {
|
|
|
244
241
|
url: '/api/v1/accounts/send_recovery_flow_email/',
|
|
245
242
|
method: 'POST',
|
|
246
243
|
form: this.client.request.sign({
|
|
247
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
248
244
|
adid: '',
|
|
249
245
|
guid: this.client.state.uuid,
|
|
250
246
|
device_id: this.client.state.deviceId,
|
|
@@ -265,7 +261,6 @@ class AccountRepository extends Repository {
|
|
|
265
261
|
url: '/api/v1/accounts/send_recovery_flow_sms/',
|
|
266
262
|
method: 'POST',
|
|
267
263
|
form: this.client.request.sign({
|
|
268
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
269
264
|
adid: '',
|
|
270
265
|
guid: this.client.state.uuid,
|
|
271
266
|
device_id: this.client.state.deviceId,
|
|
@@ -16,7 +16,6 @@ class CloseFriendsRepository extends Repository {
|
|
|
16
16
|
form: this.client.request.sign({
|
|
17
17
|
add: JSON.stringify(addUserIds),
|
|
18
18
|
remove: JSON.stringify(removeUserIds),
|
|
19
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
20
19
|
_uid: this.client.state.cookieUserId,
|
|
21
20
|
_uuid: this.client.state.uuid,
|
|
22
21
|
}),
|
|
@@ -30,7 +30,6 @@ class CollectionRepository extends Repository {
|
|
|
30
30
|
form: this.client.request.sign({
|
|
31
31
|
name,
|
|
32
32
|
added_media_ids: JSON.stringify(mediaIds),
|
|
33
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
34
33
|
_uid: this.client.state.cookieUserId,
|
|
35
34
|
_uuid: this.client.state.uuid,
|
|
36
35
|
}),
|
|
@@ -46,7 +45,6 @@ class CollectionRepository extends Repository {
|
|
|
46
45
|
name,
|
|
47
46
|
added_media_ids: JSON.stringify(addedMediaIds),
|
|
48
47
|
removed_media_ids: JSON.stringify(removedMediaIds),
|
|
49
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
50
48
|
_uid: this.client.state.cookieUserId,
|
|
51
49
|
_uuid: this.client.state.uuid,
|
|
52
50
|
}),
|
|
@@ -59,7 +57,6 @@ class CollectionRepository extends Repository {
|
|
|
59
57
|
url: `/api/v1/collections/${collectionId}/delete/`,
|
|
60
58
|
method: 'POST',
|
|
61
59
|
form: this.client.request.sign({
|
|
62
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
63
60
|
_uid: this.client.state.cookieUserId,
|
|
64
61
|
_uuid: this.client.state.uuid,
|
|
65
62
|
}),
|
|
@@ -94,7 +94,6 @@ class DirectThreadRepository extends Repository {
|
|
|
94
94
|
action: 'send_item',
|
|
95
95
|
[recipientsType]: JSON.stringify(recipientsIds),
|
|
96
96
|
client_context: mutationToken,
|
|
97
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
98
97
|
device_id: this.client.state.deviceId,
|
|
99
98
|
mutation_token: mutationToken,
|
|
100
99
|
_uuid: this.client.state.uuid,
|
|
@@ -144,7 +143,6 @@ class DirectThreadRepository extends Repository {
|
|
|
144
143
|
client_context: clientContext,
|
|
145
144
|
mutation_token: mutationToken,
|
|
146
145
|
offline_threading_id: clientContext,
|
|
147
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
148
146
|
device_id: this.client.state.deviceId,
|
|
149
147
|
_uuid: this.client.state.uuid,
|
|
150
148
|
};
|
|
@@ -210,7 +208,6 @@ class DirectThreadRepository extends Repository {
|
|
|
210
208
|
url: `/api/v1/direct_v2/threads/${threadId}/items/${threadItemId}/seen/`,
|
|
211
209
|
method: 'POST',
|
|
212
210
|
form: {
|
|
213
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
214
211
|
_uuid: this.client.state.uuid,
|
|
215
212
|
use_unified_inbox: true,
|
|
216
213
|
action: 'mark_seen',
|
|
@@ -230,7 +227,6 @@ class DirectThreadRepository extends Repository {
|
|
|
230
227
|
const response = await this.client.request.send({
|
|
231
228
|
url: `/api/v1/direct_v2/threads/${threadId}/items/${itemId}/delete/`,
|
|
232
229
|
method: 'POST',
|
|
233
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, _uuid: this.client.state.uuid },
|
|
234
230
|
});
|
|
235
231
|
return response.body || response.data || response;
|
|
236
232
|
});
|
|
@@ -244,7 +240,6 @@ class DirectThreadRepository extends Repository {
|
|
|
244
240
|
const response = await this.client.request.send({
|
|
245
241
|
url: `/api/v1/direct_v2/threads/${threadId}/approve/`,
|
|
246
242
|
method: 'POST',
|
|
247
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, _uuid: this.client.state.uuid },
|
|
248
243
|
});
|
|
249
244
|
return response.body || response.data || response;
|
|
250
245
|
});
|
|
@@ -258,7 +253,6 @@ class DirectThreadRepository extends Repository {
|
|
|
258
253
|
const response = await this.client.request.send({
|
|
259
254
|
url: `/api/v1/direct_v2/threads/${threadId}/decline/`,
|
|
260
255
|
method: 'POST',
|
|
261
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, _uuid: this.client.state.uuid },
|
|
262
256
|
});
|
|
263
257
|
return response.body || response.data || response;
|
|
264
258
|
});
|
|
@@ -272,7 +266,6 @@ class DirectThreadRepository extends Repository {
|
|
|
272
266
|
const response = await this.client.request.send({
|
|
273
267
|
url: `/api/v1/direct_v2/threads/${threadId}/mute/`,
|
|
274
268
|
method: 'POST',
|
|
275
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, _uuid: this.client.state.uuid },
|
|
276
269
|
});
|
|
277
270
|
return response.body || response.data || response;
|
|
278
271
|
});
|
|
@@ -286,7 +279,6 @@ class DirectThreadRepository extends Repository {
|
|
|
286
279
|
const response = await this.client.request.send({
|
|
287
280
|
url: `/api/v1/direct_v2/threads/${threadId}/unmute/`,
|
|
288
281
|
method: 'POST',
|
|
289
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, _uuid: this.client.state.uuid },
|
|
290
282
|
});
|
|
291
283
|
return response.body || response.data || response;
|
|
292
284
|
});
|
|
@@ -301,7 +293,6 @@ class DirectThreadRepository extends Repository {
|
|
|
301
293
|
const response = await this.client.request.send({
|
|
302
294
|
url: `/api/v1/direct_v2/threads/${threadId}/add_user/`,
|
|
303
295
|
method: 'POST',
|
|
304
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, user_ids: JSON.stringify(userIds), _uuid: this.client.state.uuid },
|
|
305
296
|
});
|
|
306
297
|
return response.body || response.data || response;
|
|
307
298
|
});
|
|
@@ -315,7 +306,6 @@ class DirectThreadRepository extends Repository {
|
|
|
315
306
|
const response = await this.client.request.send({
|
|
316
307
|
url: `/api/v1/direct_v2/threads/${threadId}/leave/`,
|
|
317
308
|
method: 'POST',
|
|
318
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, _uuid: this.client.state.uuid },
|
|
319
309
|
});
|
|
320
310
|
return response.body || response.data || response;
|
|
321
311
|
});
|
|
@@ -329,7 +319,6 @@ class DirectThreadRepository extends Repository {
|
|
|
329
319
|
const response = await this.client.request.send({
|
|
330
320
|
url: `/api/v1/direct_v2/threads/${threadId}/update_title/`,
|
|
331
321
|
method: 'POST',
|
|
332
|
-
form: { _csrftoken: this.client.state.cookieCsrfToken, _uuid: this.client.state.uuid, title },
|
|
333
322
|
});
|
|
334
323
|
return response.body || response.data || response;
|
|
335
324
|
});
|
|
@@ -114,7 +114,6 @@ class DirectRepository extends Repository {
|
|
|
114
114
|
method: 'POST',
|
|
115
115
|
url: '/api/v1/direct_v2/create_group_thread/',
|
|
116
116
|
form: this.client.request.sign({
|
|
117
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
118
117
|
_uuid: this.client.state.uuid,
|
|
119
118
|
_uid: this.client.state.cookieUserId,
|
|
120
119
|
recipient_users: JSON.stringify(recipientUsers),
|
|
@@ -220,7 +220,6 @@ class FeedRepository extends Repository {
|
|
|
220
220
|
caption: caption || '',
|
|
221
221
|
client_sidecar_id: Date.now(),
|
|
222
222
|
children_metadata: uploadIds,
|
|
223
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
224
223
|
_uid: this.client.state.cookieUserId,
|
|
225
224
|
_uuid: this.client.state.uuid,
|
|
226
225
|
}),
|
|
@@ -6,7 +6,6 @@ class FriendshipRepository extends Repository {
|
|
|
6
6
|
method: 'POST',
|
|
7
7
|
url: `/api/v1/friendships/create/${userId}/`,
|
|
8
8
|
form: this.client.request.sign({
|
|
9
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
10
9
|
_uid: this.client.state.cookieUserId,
|
|
11
10
|
_uuid: this.client.state.uuid,
|
|
12
11
|
user_id: userId,
|
|
@@ -21,7 +20,6 @@ class FriendshipRepository extends Repository {
|
|
|
21
20
|
method: 'POST',
|
|
22
21
|
url: `/api/v1/friendships/destroy/${userId}/`,
|
|
23
22
|
form: this.client.request.sign({
|
|
24
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
25
23
|
_uid: this.client.state.cookieUserId,
|
|
26
24
|
_uuid: this.client.state.uuid,
|
|
27
25
|
user_id: userId,
|
|
@@ -45,7 +43,6 @@ class FriendshipRepository extends Repository {
|
|
|
45
43
|
method: 'POST',
|
|
46
44
|
url: '/api/v1/friendships/show_many/',
|
|
47
45
|
form: this.client.request.sign({
|
|
48
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
49
46
|
_uuid: this.client.state.uuid,
|
|
50
47
|
user_ids: userIds.join(','),
|
|
51
48
|
}),
|
|
@@ -59,7 +56,6 @@ class FriendshipRepository extends Repository {
|
|
|
59
56
|
method: 'POST',
|
|
60
57
|
url: `/api/v1/friendships/approve/${userId}/`,
|
|
61
58
|
form: this.client.request.sign({
|
|
62
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
63
59
|
_uid: this.client.state.cookieUserId,
|
|
64
60
|
_uuid: this.client.state.uuid,
|
|
65
61
|
user_id: userId,
|
|
@@ -74,7 +70,6 @@ class FriendshipRepository extends Repository {
|
|
|
74
70
|
method: 'POST',
|
|
75
71
|
url: `/api/v1/friendships/ignore/${userId}/`,
|
|
76
72
|
form: this.client.request.sign({
|
|
77
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
78
73
|
_uid: this.client.state.cookieUserId,
|
|
79
74
|
_uuid: this.client.state.uuid,
|
|
80
75
|
user_id: userId,
|
|
@@ -89,7 +84,6 @@ class FriendshipRepository extends Repository {
|
|
|
89
84
|
method: 'POST',
|
|
90
85
|
url: `/api/v1/friendships/remove_follower/${userId}/`,
|
|
91
86
|
form: this.client.request.sign({
|
|
92
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
93
87
|
_uid: this.client.state.cookieUserId,
|
|
94
88
|
_uuid: this.client.state.uuid,
|
|
95
89
|
user_id: userId,
|
|
@@ -104,7 +98,6 @@ class FriendshipRepository extends Repository {
|
|
|
104
98
|
method: 'POST',
|
|
105
99
|
url: `/api/v1/friendships/block/${userId}/`,
|
|
106
100
|
form: this.client.request.sign({
|
|
107
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
108
101
|
_uid: this.client.state.cookieUserId,
|
|
109
102
|
_uuid: this.client.state.uuid,
|
|
110
103
|
user_id: userId,
|
|
@@ -119,7 +112,6 @@ class FriendshipRepository extends Repository {
|
|
|
119
112
|
method: 'POST',
|
|
120
113
|
url: `/api/v1/friendships/unblock/${userId}/`,
|
|
121
114
|
form: this.client.request.sign({
|
|
122
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
123
115
|
_uid: this.client.state.cookieUserId,
|
|
124
116
|
_uuid: this.client.state.uuid,
|
|
125
117
|
user_id: userId,
|
|
@@ -131,7 +123,6 @@ class FriendshipRepository extends Repository {
|
|
|
131
123
|
|
|
132
124
|
async mute(userId, options = {}) {
|
|
133
125
|
const form = {
|
|
134
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
135
126
|
_uid: this.client.state.cookieUserId,
|
|
136
127
|
_uuid: this.client.state.uuid,
|
|
137
128
|
user_id: userId,
|
|
@@ -155,7 +146,6 @@ class FriendshipRepository extends Repository {
|
|
|
155
146
|
|
|
156
147
|
async unmute(userId, options = {}) {
|
|
157
148
|
const form = {
|
|
158
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
159
149
|
_uid: this.client.state.cookieUserId,
|
|
160
150
|
_uuid: this.client.state.uuid,
|
|
161
151
|
user_id: userId,
|
|
@@ -56,7 +56,6 @@ class HashtagRepository extends Repository {
|
|
|
56
56
|
method: 'POST',
|
|
57
57
|
url: `/api/v1/tags/follow/${hashtag}/`,
|
|
58
58
|
form: this.client.request.sign({
|
|
59
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
60
59
|
_uid: this.client.state.cookieUserId,
|
|
61
60
|
_uuid: this.client.state.uuid,
|
|
62
61
|
}),
|
|
@@ -70,7 +69,6 @@ class HashtagRepository extends Repository {
|
|
|
70
69
|
method: 'POST',
|
|
71
70
|
url: `/api/v1/tags/unfollow/${hashtag}/`,
|
|
72
71
|
form: this.client.request.sign({
|
|
73
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
74
72
|
_uid: this.client.state.cookieUserId,
|
|
75
73
|
_uuid: this.client.state.uuid,
|
|
76
74
|
}),
|
|
@@ -24,7 +24,6 @@ class HighlightsRepository extends Repository {
|
|
|
24
24
|
|
|
25
25
|
async create(title, storyIds, coverMediaId = null) {
|
|
26
26
|
const form = {
|
|
27
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
28
27
|
_uuid: this.client.state.uuid,
|
|
29
28
|
title: title,
|
|
30
29
|
media_ids: JSON.stringify(storyIds),
|
|
@@ -46,7 +45,6 @@ class HighlightsRepository extends Repository {
|
|
|
46
45
|
|
|
47
46
|
async edit(highlightId, title, storyIds, coverMediaId = null) {
|
|
48
47
|
const form = {
|
|
49
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
50
48
|
_uuid: this.client.state.uuid,
|
|
51
49
|
title: title,
|
|
52
50
|
added_media_ids: JSON.stringify(storyIds),
|
|
@@ -71,7 +69,6 @@ class HighlightsRepository extends Repository {
|
|
|
71
69
|
method: 'POST',
|
|
72
70
|
url: `/api/v1/highlights/${highlightId}/delete_reel/`,
|
|
73
71
|
form: this.client.request.sign({
|
|
74
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
75
72
|
_uuid: this.client.state.uuid,
|
|
76
73
|
}),
|
|
77
74
|
});
|
|
@@ -84,7 +81,6 @@ class HighlightsRepository extends Repository {
|
|
|
84
81
|
method: 'POST',
|
|
85
82
|
url: `/api/v1/highlights/${highlightId}/add_highlight/`,
|
|
86
83
|
form: this.client.request.sign({
|
|
87
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
88
84
|
_uuid: this.client.state.uuid,
|
|
89
85
|
added_media_ids: JSON.stringify(storyIds),
|
|
90
86
|
source: 'story_viewer',
|
|
@@ -99,7 +95,6 @@ class HighlightsRepository extends Repository {
|
|
|
99
95
|
method: 'POST',
|
|
100
96
|
url: `/api/v1/highlights/${highlightId}/remove_highlight/`,
|
|
101
97
|
form: this.client.request.sign({
|
|
102
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
103
98
|
_uuid: this.client.state.uuid,
|
|
104
99
|
removed_media_ids: JSON.stringify(storyIds),
|
|
105
100
|
}),
|
|
@@ -113,7 +108,6 @@ class HighlightsRepository extends Repository {
|
|
|
113
108
|
method: 'POST',
|
|
114
109
|
url: `/api/v1/highlights/${highlightId}/edit_reel/`,
|
|
115
110
|
form: this.client.request.sign({
|
|
116
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
117
111
|
_uuid: this.client.state.uuid,
|
|
118
112
|
cover_media_id: coverMediaId,
|
|
119
113
|
source: 'story_viewer',
|
|
@@ -8,7 +8,6 @@ class MediaRepository extends Repository {
|
|
|
8
8
|
form: this.client.request.sign({
|
|
9
9
|
igtv_feed_preview: false,
|
|
10
10
|
media_id: mediaId,
|
|
11
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
12
11
|
_uid: this.client.state.cookieUserId,
|
|
13
12
|
_uuid: this.client.state.uuid,
|
|
14
13
|
}),
|
|
@@ -23,7 +22,6 @@ class MediaRepository extends Repository {
|
|
|
23
22
|
method: 'POST',
|
|
24
23
|
form: this.client.request.sign({
|
|
25
24
|
media_id: mediaId,
|
|
26
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
27
25
|
_uid: this.client.state.cookieUserId,
|
|
28
26
|
_uuid: this.client.state.uuid,
|
|
29
27
|
radio_type: this.client.state.radioType,
|
|
@@ -40,7 +38,6 @@ class MediaRepository extends Repository {
|
|
|
40
38
|
method: 'POST',
|
|
41
39
|
form: this.client.request.sign({
|
|
42
40
|
media_id: mediaId,
|
|
43
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
44
41
|
_uid: this.client.state.cookieUserId,
|
|
45
42
|
_uuid: this.client.state.uuid,
|
|
46
43
|
radio_type: this.client.state.radioType,
|
|
@@ -58,7 +55,6 @@ class MediaRepository extends Repository {
|
|
|
58
55
|
form: this.client.request.sign({
|
|
59
56
|
media_id: mediaId,
|
|
60
57
|
comment_text: commentText,
|
|
61
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
62
58
|
_uid: this.client.state.cookieUserId,
|
|
63
59
|
_uuid: this.client.state.uuid,
|
|
64
60
|
radio_type: this.client.state.radioType,
|
|
@@ -74,7 +70,6 @@ class MediaRepository extends Repository {
|
|
|
74
70
|
url: `/api/v1/media/${mediaId}/comment/${commentId}/delete/`,
|
|
75
71
|
method: 'POST',
|
|
76
72
|
form: this.client.request.sign({
|
|
77
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
78
73
|
_uid: this.client.state.cookieUserId,
|
|
79
74
|
_uuid: this.client.state.uuid,
|
|
80
75
|
}),
|
|
@@ -93,7 +88,6 @@ class MediaRepository extends Repository {
|
|
|
93
88
|
form: this.client.request.sign({
|
|
94
89
|
igtv_feed_preview: false,
|
|
95
90
|
media_id: mediaId,
|
|
96
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
97
91
|
_uid: this.client.state.cookieUserId,
|
|
98
92
|
_uuid: this.client.state.uuid,
|
|
99
93
|
}),
|
|
@@ -109,7 +103,6 @@ class MediaRepository extends Repository {
|
|
|
109
103
|
form: this.client.request.sign({
|
|
110
104
|
igtv_feed_preview: false,
|
|
111
105
|
media_id: mediaId,
|
|
112
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
113
106
|
_uid: this.client.state.cookieUserId,
|
|
114
107
|
_uuid: this.client.state.uuid,
|
|
115
108
|
caption_text: captionText,
|
|
@@ -127,7 +120,6 @@ class MediaRepository extends Repository {
|
|
|
127
120
|
reels: JSON.stringify(reels),
|
|
128
121
|
live_vods: JSON.stringify([]),
|
|
129
122
|
nf_token: '',
|
|
130
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
131
123
|
_uid: this.client.state.cookieUserId,
|
|
132
124
|
_uuid: this.client.state.uuid,
|
|
133
125
|
container_module: 'feed_short_url',
|
|
@@ -168,7 +160,6 @@ class MediaRepository extends Repository {
|
|
|
168
160
|
media_id: mediaId,
|
|
169
161
|
comment_text: replyText,
|
|
170
162
|
replied_to_comment_id: commentId,
|
|
171
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
172
163
|
_uid: this.client.state.cookieUserId,
|
|
173
164
|
_uuid: this.client.state.uuid,
|
|
174
165
|
radio_type: this.client.state.radioType,
|
|
@@ -182,7 +173,6 @@ class MediaRepository extends Repository {
|
|
|
182
173
|
url: `/api/v1/media/${mediaId}/comment/${commentId}/comment_like/`,
|
|
183
174
|
method: 'POST',
|
|
184
175
|
form: this.client.request.sign({
|
|
185
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
186
176
|
_uid: this.client.state.cookieUserId,
|
|
187
177
|
_uuid: this.client.state.uuid,
|
|
188
178
|
}),
|
|
@@ -195,7 +185,6 @@ class MediaRepository extends Repository {
|
|
|
195
185
|
url: `/api/v1/media/${mediaId}/comment/${commentId}/comment_unlike/`,
|
|
196
186
|
method: 'POST',
|
|
197
187
|
form: this.client.request.sign({
|
|
198
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
199
188
|
_uid: this.client.state.cookieUserId,
|
|
200
189
|
_uuid: this.client.state.uuid,
|
|
201
190
|
}),
|
|
@@ -209,7 +198,6 @@ class MediaRepository extends Repository {
|
|
|
209
198
|
method: 'POST',
|
|
210
199
|
form: this.client.request.sign({
|
|
211
200
|
comment_ids_to_delete: commentIds.join(','),
|
|
212
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
213
201
|
_uid: this.client.state.cookieUserId,
|
|
214
202
|
_uuid: this.client.state.uuid,
|
|
215
203
|
}),
|
|
@@ -219,7 +207,6 @@ class MediaRepository extends Repository {
|
|
|
219
207
|
|
|
220
208
|
async save(mediaId, collectionId = null) {
|
|
221
209
|
const form = {
|
|
222
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
223
210
|
_uid: this.client.state.cookieUserId,
|
|
224
211
|
_uuid: this.client.state.uuid,
|
|
225
212
|
};
|
|
@@ -237,7 +224,6 @@ class MediaRepository extends Repository {
|
|
|
237
224
|
url: `/api/v1/media/${mediaId}/unsave/`,
|
|
238
225
|
method: 'POST',
|
|
239
226
|
form: this.client.request.sign({
|
|
240
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
241
227
|
_uid: this.client.state.cookieUserId,
|
|
242
228
|
_uuid: this.client.state.uuid,
|
|
243
229
|
}),
|
|
@@ -251,7 +237,6 @@ class MediaRepository extends Repository {
|
|
|
251
237
|
method: 'POST',
|
|
252
238
|
form: this.client.request.sign({
|
|
253
239
|
media_id: mediaId,
|
|
254
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
255
240
|
_uid: this.client.state.cookieUserId,
|
|
256
241
|
_uuid: this.client.state.uuid,
|
|
257
242
|
}),
|
|
@@ -265,7 +250,6 @@ class MediaRepository extends Repository {
|
|
|
265
250
|
method: 'POST',
|
|
266
251
|
form: this.client.request.sign({
|
|
267
252
|
media_id: mediaId,
|
|
268
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
269
253
|
_uid: this.client.state.cookieUserId,
|
|
270
254
|
_uuid: this.client.state.uuid,
|
|
271
255
|
}),
|
|
@@ -278,7 +262,6 @@ class MediaRepository extends Repository {
|
|
|
278
262
|
url: `/api/v1/media/${mediaId}/disable_comments/`,
|
|
279
263
|
method: 'POST',
|
|
280
264
|
form: this.client.request.sign({
|
|
281
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
282
265
|
_uid: this.client.state.cookieUserId,
|
|
283
266
|
_uuid: this.client.state.uuid,
|
|
284
267
|
}),
|
|
@@ -291,7 +274,6 @@ class MediaRepository extends Repository {
|
|
|
291
274
|
url: `/api/v1/media/${mediaId}/enable_comments/`,
|
|
292
275
|
method: 'POST',
|
|
293
276
|
form: this.client.request.sign({
|
|
294
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
295
277
|
_uid: this.client.state.cookieUserId,
|
|
296
278
|
_uuid: this.client.state.uuid,
|
|
297
279
|
}),
|
|
@@ -9,7 +9,6 @@ class StoryRepository extends Repository {
|
|
|
9
9
|
url: `/api/v1/media/${storyId}/story_react/`,
|
|
10
10
|
method: 'POST',
|
|
11
11
|
form: this.client.request.sign({
|
|
12
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
13
12
|
_uid: this.client.state.cookieUserId,
|
|
14
13
|
_uuid: this.client.state.uuid,
|
|
15
14
|
reaction_type: 'like',
|
|
@@ -103,7 +103,6 @@ class UploadRepository extends Repository {
|
|
|
103
103
|
upload_id: options.uploadId,
|
|
104
104
|
source_type: options.source_type || '4',
|
|
105
105
|
camera_position: options.camera_position || 'back',
|
|
106
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
107
106
|
_uid: this.client.state.cookieUserId,
|
|
108
107
|
_uuid: this.client.state.uuid,
|
|
109
108
|
creation_logger_session_id: this.chance.guid(),
|
|
@@ -37,7 +37,6 @@ class UserRepository extends Repository {
|
|
|
37
37
|
method: 'POST',
|
|
38
38
|
url: `/api/v1/friendships/create/${userId}/`,
|
|
39
39
|
form: this.client.request.sign({
|
|
40
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
41
40
|
_uid: this.client.state.cookieUserId,
|
|
42
41
|
_uuid: this.client.state.uuid,
|
|
43
42
|
user_id: userId,
|
|
@@ -52,7 +51,6 @@ class UserRepository extends Repository {
|
|
|
52
51
|
method: 'POST',
|
|
53
52
|
url: `/api/v1/friendships/destroy/${userId}/`,
|
|
54
53
|
form: this.client.request.sign({
|
|
55
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
56
54
|
_uid: this.client.state.cookieUserId,
|
|
57
55
|
_uuid: this.client.state.uuid,
|
|
58
56
|
user_id: userId,
|
|
@@ -95,7 +93,6 @@ class UserRepository extends Repository {
|
|
|
95
93
|
url: '/api/v1/friendships/show_many/',
|
|
96
94
|
form: this.client.request.sign({
|
|
97
95
|
user_ids: userIds.join(','),
|
|
98
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
99
96
|
_uuid: this.client.state.uuid,
|
|
100
97
|
}),
|
|
101
98
|
});
|
|
@@ -126,7 +123,6 @@ class UserRepository extends Repository {
|
|
|
126
123
|
method: 'POST',
|
|
127
124
|
url: '/api/v1/accounts/set_biography/',
|
|
128
125
|
form: this.client.request.sign({
|
|
129
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
130
126
|
_uid: this.client.state.cookieUserId,
|
|
131
127
|
_uuid: this.client.state.uuid,
|
|
132
128
|
raw_text: biography,
|
|
@@ -141,7 +137,6 @@ class UserRepository extends Repository {
|
|
|
141
137
|
url: `/api/v1/users/${userId}/flag_user/`,
|
|
142
138
|
form: this.client.request.sign({
|
|
143
139
|
reason_id: reason,
|
|
144
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
145
140
|
_uid: this.client.state.cookieUserId,
|
|
146
141
|
_uuid: this.client.state.uuid,
|
|
147
142
|
}),
|
|
@@ -12,7 +12,6 @@ class LiveService extends Repository {
|
|
|
12
12
|
method: 'POST',
|
|
13
13
|
url: '/api/v1/live/create/',
|
|
14
14
|
form: this.client.request.sign({
|
|
15
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
16
15
|
_uuid: this.client.state.uuid,
|
|
17
16
|
preview_width: previewWidth,
|
|
18
17
|
preview_height: previewHeight,
|
|
@@ -28,7 +27,6 @@ class LiveService extends Repository {
|
|
|
28
27
|
method: 'POST',
|
|
29
28
|
url: `/api/v1/live/${broadcastId}/start/`,
|
|
30
29
|
form: this.client.request.sign({
|
|
31
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
32
30
|
_uuid: this.client.state.uuid,
|
|
33
31
|
should_send_notifications: shouldSendNotifications ? '1' : '0',
|
|
34
32
|
}),
|
|
@@ -42,7 +40,6 @@ class LiveService extends Repository {
|
|
|
42
40
|
method: 'POST',
|
|
43
41
|
url: `/api/v1/live/${broadcastId}/end_broadcast/`,
|
|
44
42
|
form: this.client.request.sign({
|
|
45
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
46
43
|
_uuid: this.client.state.uuid,
|
|
47
44
|
end_after_copyright_warning: endAfterCopyrightWarning ? '1' : '0',
|
|
48
45
|
}),
|
|
@@ -74,7 +71,6 @@ class LiveService extends Repository {
|
|
|
74
71
|
method: 'POST',
|
|
75
72
|
url: `/api/v1/live/${broadcastId}/comment/`,
|
|
76
73
|
form: this.client.request.sign({
|
|
77
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
78
74
|
_uuid: this.client.state.uuid,
|
|
79
75
|
user_breadcrumb: this.client.request.userBreadcrumb(message.length),
|
|
80
76
|
idempotence_token: Date.now(),
|
|
@@ -92,7 +88,6 @@ class LiveService extends Repository {
|
|
|
92
88
|
method: 'POST',
|
|
93
89
|
url: `/api/v1/live/${broadcastId}/like/`,
|
|
94
90
|
form: this.client.request.sign({
|
|
95
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
96
91
|
_uuid: this.client.state.uuid,
|
|
97
92
|
user_like_count: likeCount,
|
|
98
93
|
}),
|
|
@@ -106,7 +101,6 @@ class LiveService extends Repository {
|
|
|
106
101
|
method: 'POST',
|
|
107
102
|
url: `/api/v1/live/${broadcastId}/heartbeat_and_get_viewer_count/`,
|
|
108
103
|
form: this.client.request.sign({
|
|
109
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
110
104
|
_uuid: this.client.state.uuid,
|
|
111
105
|
offset_to_video_start: '0',
|
|
112
106
|
}),
|
|
@@ -120,7 +114,6 @@ class LiveService extends Repository {
|
|
|
120
114
|
method: 'POST',
|
|
121
115
|
url: `/api/v1/live/${broadcastId}/mute_comment/`,
|
|
122
116
|
form: this.client.request.sign({
|
|
123
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
124
117
|
_uuid: this.client.state.uuid,
|
|
125
118
|
user_id: userId,
|
|
126
119
|
}),
|
|
@@ -134,7 +127,6 @@ class LiveService extends Repository {
|
|
|
134
127
|
method: 'POST',
|
|
135
128
|
url: `/api/v1/live/${broadcastId}/unmute_comment/`,
|
|
136
129
|
form: this.client.request.sign({
|
|
137
|
-
_csrftoken: this.client.state.cookieCsrfToken,
|
|
138
130
|
_uuid: this.client.state.uuid,
|
|
139
131
|
user_id: userId,
|
|
140
132
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodejs-insta-private-api-mqtt",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.65",
|
|
4
4
|
"description": "Complete Instagram MQTT protocol with FULL iOS + Android support. 33 device presets (21 iOS + 12 Android). iPhone 16/15/14/13/12, iPad Pro, Samsung, Pixel, Huawei. Real-time DM messaging, view-once media extraction, sub-500ms latency.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|