Instagram Without API (IWA)
This module displays a block of recent posts from a public Instagram account without needing an API key. It fetches images directly from Instagram and stores them locally for display on your site.
Displays a block of recent posts from a public Instagram account, no API key or access token required.
Requirements
The public Instagram account must not be set to private
Your server must be able to make outbound HTTPS requests to instagram.com
Installation
Install as you would any contributed Drupal module:
composer require drupal/instagram_without_api
drush en instagram_without_api -ySee Installing Drupal Modules for further information.
Configuration
- Go to Administration → Structure → Block layout
- Place the Instagram Without API block in your desired region
- In the block settings, configure:
- Instagram User Name — the public account to pull posts from (e.g. drupalassociation)
- Number of images to display — defaults to 4
- Image width / height — in pixels, defaults to 200×200
- Cache time — in minutes, defaults to 1440 (24 hours)
How it works
The module fetches recent posts from Instagram's public web_profile_info JSON endpoint (no credentials needed for public accounts). If that endpoint is unavailable it falls back to scraping the HTML profile page. Images are downloaded and stored locally under public://instagram_without_api/ to avoid CORS issues when rendering them in the browser.