Instagram Without API

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 -y

See Installing Drupal Modules for further information.

Configuration

  1. Go to Administration → Structure → Block layout
  2. Place the Instagram Without API block in your desired region
  3. 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.

Supporting organizations: 

Project information

Releases