Instagram

Connecting to Instagram

Instagram supports OAuth authentication only.

Allow Access to Instagram Data

To allow users to connect through the provider, complete the tasks below:

  1. Connect a Facebook Page to an Instagram account.

  2. Create and register the provider as an app with Instagram.

  3. Submit your app for Facebook's review.

Connect a Facebook Page to an Instagram Account

To access Instagram data, users need a role on a page that is associated with an Instagram account. Any user with a role on the page has access.

To connect a page and an Instagram account, log into Facebook and from your Page's settings, click Instagram, and log into your Instagram account. If your account is not an Instagram Business Account, follow the prompts to set up a business profile.

Create and Register the App

Register an app to obtain the values for the OAuthClientId and OAuthClientSecret properties. The OAuth client credentials authenticate the provider to Facebook.

  1. Log into Facebook and navigate to https://developers.facebook.com/apps.

  2. Create a new app and click Settings > Basic. The OAuthClientId is the App Id displayed. The OAuthClientSecret is the App Secret.

  3. Click Add Platform and select Website. Enter a Site URL. This value is not used in authentication.

Add the Facebook Login Product

Follow these steps to configure the OAuth redirect URI.

  1. Go to your app settings and add the Facebook Login product from the "Products" section.

  2. In the product settings, define the OAuth redirect URI.

    If you are building a desktop application, set the redirect URI to https://localhost:33333/, or a similar https url.

    If you are building a web application, set the redirect URI you want to be used as the callback URL that users return to with the token that verifies that they have granted your app access.

Add the Instagram API Product

Follow these steps to configure the Instagram API permissions your app requests:

  1. Go to your app settings and add the Instagram product from the "Products" section.

  2. Configure the permissions in the product settings. To access all the tables and views, include the following scopes:

    • instagram_basic

    • instagram_manage_comments

    • instagram_manage_insights

Submit the App for Review to Go Live

While you can still with an application without review, to go live and fully access Instagram content, you must submit your application for review and approval.

  1. Click Manage for your application and on the Permissions tab click Start a Submission.

  2. Select the use case that best describes your Instagram integration.

  3. Fill in the form and wait for your application to be approved.

After setting the following, you are ready to connect:

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.

  • OAuthClientId (custom applications only): Set this to the client Id assigned when you registered your application.

  • OAuthClientSecret (custom applications only): Set this to the client secret assigned when you registered your application.

  • CallbackURL (custom application only): Set this to the redirect URI defined when you registered your application.

When you connect, the provider opens Instagram's OAuth endpoint in your default browser. Log in and grant permissions to the application. The provider then completes the OAuth process:

  1. The provider obtains an access token from Instagram and uses it to request data.

  2. The OAuth values are saved in the path specified in OAuthSettingsLocation. These values persist across connections.

The provider refreshes the access token automatically when it expires.

Last updated