<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: gooo.blog</title>
    <description>The latest articles on DEV Community by gooo.blog (@iflalibpuborg).</description>
    <link>https://dev.to/iflalibpuborg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F878625%2F8fced769-6875-47cf-9b5d-e354a1b10038.png</url>
      <title>DEV Community: gooo.blog</title>
      <link>https://dev.to/iflalibpuborg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iflalibpuborg"/>
    <language>en</language>
    <item>
      <title>Instagram Private API WEB- Node</title>
      <dc:creator>gooo.blog</dc:creator>
      <pubDate>Fri, 17 Jun 2022 11:12:13 +0000</pubDate>
      <link>https://dev.to/iflalibpuborg/instagram-private-api-web-node-fhg</link>
      <guid>https://dev.to/iflalibpuborg/instagram-private-api-web-node-fhg</guid>
      <description>&lt;p&gt;Simple, easy implementation of the Instagram private web API.&lt;br&gt;
Some API reference from &lt;a href="https://github.com/jlobos/instagram-web-api"&gt;jlobos/instagram-web-api&lt;/a&gt;&lt;br&gt;
Send DM using client from &lt;a href="https://github.com/dilame/instagram-private-api"&gt;dilame/instagram-private-api&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i instagram-web-api-node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { IgApiClient } = require("instagram-web-api-node");
function save(data){
  let cookie = JSON.stringify(data); 
  //save cookie to file or database after 
  //code save
  return cookie;
}
(async () =&amp;gt; { 
  try {
      const instagram = new IgApiClient();
      // This function executes after every request
      instagram.request.end$.subscribe(async () =&amp;gt; {
        const serialized = await instagram.state.serialize();
        save(serialized); 
      });
      //set login account
      const { username, password } = process.env; 
      await instagram.state.generateDevice(); 
      //login use account username and password
      await instagram.ig.login(username, password);
  } catch (error){
      console.log(error.name)
  }
})();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to login without username and password
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { IgApiClient } = require("instagram-web-api-node");
(async () =&amp;gt; { 
  try {
      const instagram = new IgApiClient();
      await instagram.state.deserialize(cookie); //cookiejson

      const follow = instagram.ig.follow(userid);
  } catch (error){
      console.log(error.name)
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An example of a website that uses this API: &lt;a href="https://www.gooo.blog/"&gt;Auto Followers Instagram&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
