Instagram

The Instagram component provides actions that use the Instagram Basic API to fetch basic profile information, photos, and videos from Instagram accounts.

Instagram’s API documentation can be found at: https://developers.facebook.com/docs/instagram-basic-display-api.

Credentials

The following credentials are required to authenticate the Squiz Connect Instagram Component with your Instagram instance.

Title

The title of your Credential

Client ID

The Client ID obtained when creating an Application in your Facebook Developer Portal.

Client Secret

The Client Secret obtained when creating an Application in your Facebook Developer Portal.

Authorization Endpoint

The URL used by Connect to authenticate with Instagram. Unless otherwise specified, this should always be https://api.instagram.com/oauth/authorize.

Token Endpoint

The URL Connect uses to generate tokens for authentication with Instagram. Unless otherwise specified, this should always be https://api.instagram.com/oauth/access_token

Exchange Token Endpoint

The URL Connect uses to exchange short-lived access tokens for long-lived access tokens. Unless otherwise specified, this should always be https://graph.instagram.com/access_token

Refresh Token Endpoint

The URL used by Connect to refresh an access token. Unless otherwise specified, this should always be https://graph.instagram.com/refresh_access_token

Split result if it’s an array

Some requests will return a response with an array of objects as its top-level object.

If this checkbox is selected, the component will emit one message for every array element.

The component will emit the entire response as a single message if it is not selected.

Do not throw error on failed calls

If this checkbox is selected, the component will emit any error response from Instagram as a message and allow the flow to continue.

If it is not selected, an error response from Instagram will cause the component to throw an error, and the flow run will fail.

Example use case - when retrieving a media item, if the media item does not exist, we may want our flow to continue - selecting this checkbox will cause the component to emit a 404 response as a message so the flow can continue.

Pagination

The connector provides the' Use Pagination' option for all actions that may return more than one result.

Selecting this option will tell the connector to try to retrieve the complete set of paginated results by making multiple requests to Instagram and emitting all of the results at once.

Due to platform limitations, the maximum number of paginated results that can be returned is 1000.

If your dataset is more extensive than 1000, the connector can handle this within your flow.

If Use Pagination is not selected, and since Instagram Basic API returns a paginated response, the connector will emit a paging object along with the data object that contains the results.

This object contains the details of the next and previous pages, and the cursor object contains after and before cursors, which can be used in subsequent steps.

The connector also provides a Results Per Page field for any action that can return paginated results.

This should be between one and 100.

If not specified, API use 25 as the default value, and if supplied a value larger than 100, it will automatically be set to 100 by the Instagram API.

The platform also provides a Max Pagination Values field.

If using pagination, this is the maximum number of results the component will try to handle.

If the result set exceeds this number, an error will be thrown.

Defaults to 1000.

Read the documentation at https://developers.facebook.com/docs/graph-api/results for more information on Instagram API pagination.

Actions

Get user

Will return the specified User with profile data (fields) on the User.

Get media

Will return the collection of Media to an Instagram User.

Input fields

Results per page

A custom number of results with the ?limit parameter. Instagram allows a maximum of 100 results per page. Leave blank for Instagram to default to 25

Get media object

Will return data (fields) on the specified media item (an image, video, or album).

Input fields

Media ID

The media object’s ID.

Get an album

Will return a collection of image and video Media on an album Media.

Input fields

Album ID

The album’s ID.

Results per page

A custom number of results with the ?limit parameter. Instagram allows a maximum of 100 results per page. leave blank for Instagram to default to 25