{"id":28101564,"url":"https://github.com/workwithpact/instagram-graph-cfworker","last_synced_at":"2025-10-26T14:36:25.919Z","repository":{"id":224984654,"uuid":"276953202","full_name":"workwithpact/Instagram-Graph-CFWorker","owner":"workwithpact","description":"Multi-Tenant Instagram Basic Display on Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2022-05-18T21:10:04.000Z","size":12,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T19:14:58.879Z","etag":null,"topics":["cloudflare-worker","instagram-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workwithpact.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-07-03T17:23:54.000Z","updated_at":"2024-01-15T22:31:03.000Z","dependencies_parsed_at":"2024-02-28T18:50:56.091Z","dependency_job_id":null,"html_url":"https://github.com/workwithpact/Instagram-Graph-CFWorker","commit_stats":null,"previous_names":["workwithpact/instagram-graph-cfworker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/workwithpact/Instagram-Graph-CFWorker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workwithpact%2FInstagram-Graph-CFWorker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workwithpact%2FInstagram-Graph-CFWorker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workwithpact%2FInstagram-Graph-CFWorker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workwithpact%2FInstagram-Graph-CFWorker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workwithpact","download_url":"https://codeload.github.com/workwithpact/Instagram-Graph-CFWorker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workwithpact%2FInstagram-Graph-CFWorker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271895127,"owners_count":24840090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-worker","instagram-api"],"created_at":"2025-05-13T18:57:06.083Z","updated_at":"2025-10-26T14:36:25.847Z","avatar_url":"https://github.com/workwithpact.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Tenant Instagram Basic Display on CloudFlare Workers\nWe've had to set up quite a few Basic Display instagram connectors for our clients.\n\nWe've reinvented the wheel a few times, and grew tired of it. So we made this multi-tenant CloudFlare Worker to handle instagram basic displays.\n\n## Setting it up\nOnce deployed to Cloudflare, create a new secret for each of your clients. For example, if your client is `alexleclair`, do:\n```\nwranger secret put TOKEN_ALEXLECLAIR\n```\nand paste in your [Basic Display API token](https://developers.facebook.com/docs/instagram-basic-display-api/)\n\nInstagram data will then be available at : `https://\u003cworker-name\u003e.\u003csubdomain\u003e.workers.dev/alexleclair`\n\n\n## Allowing user login (Advanced use case)\nIf you want, you can also use the Instagram Login flow and save tokens in Workers KV.\n\nTo do so, first create a new KV namespace within Cloudflare and copy its ID.\nNext, open `wrangler.toml` and add the following configuration at the bottom of the file, taking care to change `{ID}` to the ID you copied from Cloudflare.\n\n```\nkv_namespaces = [ \n  { binding = \"graphConfig\", id = \"{ID}\", preview_id = \"{ID}\" }\n]\n```\n\nOnce done, head over to Facebook Developers and find the app you created in the \"Setting it up\" section of this README.\nIn the left sidebar, under PRODUCTS, click on `Instagram Basic Display`, then `Basic Display`.\n\nCopy your Instagram App Id, and set it up in your Worker as a secret:\n```\nwrangler secret put APP_ID\n```\n\nDo the same thing with the app secret:\n```\nwrangler secret put APP_SECRET\n```\n\nOnce published to cloudflare (`wrangler publish`), head over to your Worker's URL: `https://{WORKER_NAME}.{WORKER_SUBDOMAIN}.workers.dev`, which will automatically redirect you to the Instagram login flow.\n\nOnce you've gone through the login flow, (and assuming you were setup as a tester if the app is in development mode), you will be able to fetch your media through `https://{WORKER_NAME}.{WORKER_SUBDOMAIN}.workers.dev/{USERNAME}`, where `{USERNAME}` is your Instagram username.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkwithpact%2Finstagram-graph-cfworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkwithpact%2Finstagram-graph-cfworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkwithpact%2Finstagram-graph-cfworker/lists"}