
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
The Instagram Basic Display API allows users of your app to get basic profile information, photos, and videos in their Instagram accounts. The API can be used to access any type of Instagram account but only provides read-access to basic data.
Add this line to your application's Gemfile:
gem 'insta-api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install insta-api
Construct the Authorization Window URL below, replacing {app-id} with your Instagram app’s ID (from the App Dashboard > Products > Instagram > Basic Display > Instagram App ID field
), replacing {app-secret} with your Instagram app’s ID (from the App Dashboard > Products > Instagram > Basic Display > Instagram App Secret
) and {redirect-uri} with your website URL that you provided in Step 2 (Valid OAuth Redirect URIs
). The URL must be exactly the same.
> require 'insta'
> options = { redirect_uri: `redirect-uri`, client_id: `app-id`, client_secret: `app-secret` }
> client = Insta::Client.new(options)
> client.auth_url
# output:
# https://api.instagram.com/oauth/authorize?client_id=#{client_id}&redirect_uri=#{redirect_uri}&scope=#{scope}&response_type=code
Authenticate your Instagram user by signing into the Authorization Window, then click Authorize to grant your app access to your profile data. Upon success, the page will redirect you to the redirect URI you included in the previous step and append an Authorization Code. For example:
https://socialsizzle.herokuapp.com/auth/?code=AQDp3TtBQQ...#_
Note that #_
has been appended to the end of the redirect URI, but it is not part of the code
itself. Copy the code (without the #_
portion) so you can use it in the next step.
code => ....auth/?code=AQDp3TtBQQ...
#_
> client.access_token(code)
# output:
# {
# "access_token": "IGQVJ...",
# "user_id": 17841405793187218
# }
long-lived valid only 60day
> access_token = "IGQVJ..."
> client.long_lived_access_token(access_token)
# output:
# {
# "access_token": "{access-token}",
# "token_type": "{token-type}",
# "expires_in": {expires-in}
# }
> require 'insta'
> access_token = "IGQVJ..."
> client = Insta::API.new(access_token)
> client.me
> client.media
> # or
> client.media(25)
> # for pagination after above method call, run below method for getting next 25 media
> client.next_page
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that insta-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.