@weborigami/instagram v0.0.5
This is a tree driver for the Instagram Basic Display API.
Authentication
Authentication with the Instagram API is even more tiresome than with most services.
See Instagram's Getting Started page for an overview and a walkthrough of creating an application and obtaining an Instagram "short-lived access token". Then follow the steps to get a long-lived access token.
At the end of that process, you should have an access token (a string of letters and numbers) that you can save in a file.
Bear in mind that (as of August 2024) even a "long-lived" Instagram token will only be good for 60 days.
Usage
- Use npm to install the main
@weborigami/origami
package and this@weborigami/instagram
extension. - Obtain an access token (above).
- Save the access token in a file called
token
. - Add the name of that
token
file to.gitignore
so that your token will not be stored in source control.
With that, you can then use the Origami CLI to display a list of your top-level Instagram albums, images, and videos:
$ ori "@keys package:@weborigami/instagram(token)"
Each top-level file or folder will have a name with the item's date and time.
You can copy a top-level image (or video) locally:
$ ori "package:@weborigami/instagram(token)/<imageName>" > fileName.jpg
You can ask ori
to display a list of the images in an album with a given name:
$ ori "@keys package:@weborigami/instagram(token)/<albumName>"
You can copy an album locally with:
$ ori "@copy package:@weborigami/instagram(token)/<albumName>, @files/album"
This will create a folder called album
containing copies of all the images and videos in the indicated album.
You can archive your whole Instagram profile to a folder called archive
with:
$ ori "@copy package:@weborigami/instagram(token), @files/archive"