Get all directInbox messages - isMoreAvailable doesn't work #1001
See original GitHub issueCan’t get more then 10 directInbox messages
Trying to get all messages from inbox. I know there are lots of issues about this but still doesn’t work
Tried this but isMoreAvailable() always false
I can get all messages only after setting ‘thread_message_limit’ to 1000 in DirectInboxFeed class from npm package directly
Pls check how can we get all directInbox messages
Code
const ig = new instagramPrivateApi.IgApiClient();
// You must generate device id's before login.
// Id's generated based on seed
// So if you pass the same value as first argument - the same id's are generated every time
ig.state.generateDevice(process.env.IG_USERNAME);
// Optionally you can setup proxy url
//ig.state.proxyUrl = process.env.IG_PROXY;
(async () => {
// Execute all requests prior to authorization in the real Android application
// Not required but recommended
await ig.simulate.preLoginFlow();
const loggedInUser = await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD);
// The same as preLoginFlow()
// Optionally wrap it to process.nextTick so we dont need to wait ending of this bunch of requests
process.nextTick(async () => await ig.simulate.postLoginFlow());
// Create UserFeed instance to get loggedInUser's posts
let isMoreAvailable = false;
const dmFeed = ig.feed.directInbox();
const dmFeedItems = await dmFeed.items();
isMoreAvailable = await dmFeed.isMoreAvailable();
const dmFeed2 = ig.feed.directInbox();
const dmFeedItems2 = await dmFeed2.items();
isMoreAvailable = await dmFeed2.isMoreAvailable();
})();
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
How to better diagnose -1001 "The … | Apple Developer Forums
The app is trying to send multiple requests over the minutes things are not working, and they are all failing with the same...
Read more >Top 8 Ways to Fix Instagram Direct Messages Not Working
Let's discuss every possible scenario and troubleshoot the issue for you. 1. Check Instagram Servers. One of the biggest culprits behind ...
Read more >Direct Messaging - Instagram Help Center
View and reply to disappearing photos and videos you receive in Instagram Direct.
Read more >How to Check Your Instagram Messages - Alphr
1. Launch the Instagram app and log in. 2. Select your account, if you have multiple. 3. Tap the mail icon in the...
Read more >About Professional Features in Instagram Direct ... - Facebook
When you switch to a professional account, you'll have access to an inbox that allows you to organize messages and control notifications.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This happens, because you are using a brand new feed every time. You have to reuse the feed or how else could it know about its state. The function I provided in #969 will then work. I assume you want to get all items, so integrating the function will look like this:
doesnt work for DMs.