Skip to content
Bridges Instagram posts to Matrix (chat not supported)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
db
migrations
src
web
.gitignore
.travis.yml
LICENSE
PRIVACY_POLICY.md
README.md
app.js
package-lock.json
package.json
postcss.config.js
tsconfig.json
tslint.json
webpack.config.js

README.md

matrix-appservice-instagram

TravisCI badge

Bridges Instagram media to Matrix. Talk about it on Matrix: #instagram:t2bot.io

instagram-bridge

Requirements

  • NodeJS (v6.9 or higher recommended)
  • A Synapse server
  • An Instagram application to hook up to

Features

  • OAuth with Instagram to avoid rate limit problems
  • Handling of authenticated users (subscribe API)
  • Posting media to Matrix rooms
  • Hashtag rooms - #4
  • Provisioning API - #9
  • Stats/Monitoring API - #10
  • Being able to unsubscribe your account from the bridge - #15

Things that won't be added

  • Matrix to Instagram (prohibited by Instagram)
  • Posting media for non-authenticated users (prohibited by Instagram)

Installation

Before you begin: A Synapse server is required. The instructions here assume that Synapse server is a default setup.

  1. Clone this repository and install the depdendencies

    git clone http://github.com/turt2live/matrix-appservice-instagram
    cd matrix-appservice-instagram
    npm install
    
  2. Copy config/sample.yaml to config/config.yaml and fill in the appropriate fields

  3. Generate the registration file

    node app.js -r -u "http://localhost:9000" -c config/config.yaml
    

    Note: The default URL to run the appservice is http://localhost:9000. If you have other appservices, or other requirements, pick an appropriate hostname and port.

  4. Copy/symlink the registration file to your Synapse directory

    cd ~/.synapse
    ln -s ../matrix-appservice-instagram/appservice-registration-instagram.yaml appservice-registration-instagram.yaml
    
  5. Add the registration file to your homeserver.yaml

    ...
    app_service_config_files: ["appservice-registration-instagram.yaml"]
    ...
    
  6. Restart Synapse (synctl restart, for example)

Running

Using the port specified during the install (9000 by default), use node app.js -p 9000 -c config/config.yaml from the repository directory.

The bridge should start working shortly afterwards.

Usage

Invite the Instagram account to your room. For example, @_instagram_turt2live:t2bot.io will invite turt2live's Instagram virtual user to the room.

Only users that have allowed the bridge to post media will post media in Matrix. To allow the bridge to use your account, open a conversation with @_instagram:t2bot.io and send the message !auth.

General information and stuff

This is based off matrix-appservice-bridge and uses instagram-api to connect to Instagram for media processing.

Instagram users are encouraged to authenticate with the bridge (in a 1:1 conversation, send !auth) so their media can be sent to people on Matrix.

matrix-appservice-twitter was used as a reference implementation of a Synapse appservice - thanks Half-Shot!

The privacy policy can be seen in PRIVACY_POLICY.md.

You can’t perform that action at this time.