Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Use Instagram Private API in a Chrome Extension with Cookies, Without Node.js #1806

Open
3 tasks done
geanrt opened this issue Dec 1, 2024 · 7 comments
Open
3 tasks done
Labels
enhancement unconfirmed This issue hasn't been read/confirmed/accepted by an admin

Comments

@geanrt
Copy link

geanrt commented Dec 1, 2024

Feature Request

Notes

Description

Hi! I'm currently working on a Chrome extension that interacts with Instagram, and I already have the necessary cookies for authentication (like sessionid, csrftoken, etc.) from the browser. I'm trying to figure out how I can use the Instagram Private API directly in the extension to send direct messages or perform other actions, but without relying on Node.js.

Here's the problem:

  • I don't want to set up a Node.js backend for my extension.
  • I already have access to the cookies stored in my browser session.
  • I would like to know how I can interact with the Instagram API using those cookies directly within the browser (i.e., from the extension) to send messages, retrieve data, or perform other Instagram actions.

Is it possible to integrate the Instagram Private API directly in a Chrome extension without Node.js? I would appreciate any updates, tips, or examples on how to achieve this.

Thanks!

@geanrt geanrt added enhancement unconfirmed This issue hasn't been read/confirmed/accepted by an admin labels Dec 1, 2024
@geanrt
Copy link
Author

geanrt commented Dec 1, 2024

If there is nothing ready, I will start creating a project like this and leave it open

@sunmasters
Copy link

Yea possible. Use headers. That's enough for API

@geanrt
Copy link
Author

geanrt commented Dec 12, 2024

Yea possible. Use headers. That's enough for API

Please could you give me a small example of how I could use these Cookies and set them in the IGPAPI header and how to make it work without Node? Thanks

@sunmasters
Copy link

Use fetch API, instagram API as headers

@geanrt
Copy link
Author

geanrt commented Dec 14, 2024

Forget it, that doesn't work, I want something that can be used directly on the client-side environment, in the browser.

@Deathstroke751
Copy link

Forget it, that doesn't work, I want something that can be used directly on the client-side environment, in the browser.

Won't it get CORS blocked if u try to run it on client?

@sunmasters
Copy link

Extensions can modify CORS headers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement unconfirmed This issue hasn't been read/confirmed/accepted by an admin
Projects
None yet
Development

No branches or pull requests

3 participants