Instagram API Action
This document provides comprehensive details on the available actions in the UChat Instagram integration, enabling you to automate tasks, interact with your followers, and efficiently manage your account.
Prerequisites
UChat account
Instagram Business account
Configuring the Integration in UChat
Log in to your UChat account.
Access "Settings" and then "Channels".
Click on "Add Channel" and select "Instagram".
For more information about the integration step, click in the link bellow:
Inserting the Action Node into your flow
Insert an Action Node into your flow and go to Advanced Actions
Select Instagram API
Available Actions
UChat offers a variety of actions to automate tasks and interact with Instagram.
Get Instagram User
Description: Retrieves information about a specific Instagram user.
Response:
name: User's name.
username: Instagram username.
profile_pic: URL of the profile picture.
is_verified_user: Indicates if the user is verified.
follower_count: Number of followers.
is_user_follow_business: Indicates if the user follows the business account.
is_business_follow_user: Indicates if the business account follows the user.
id: Instagram account ID.
Get Instagram Account
Description: Retrieves information about an Instagram account.
Parameters/Fields:
fields (optional): Comma-separated list of fields to return (e.g., media_count,followers_count).
Response:
id: Instagram account ID.
username: Instagram username.
name: Instagram account name.
media_count: Number of media posts.
follows_count: Number of users followed by the account.
followers_count: Number of followers of the account.
profile_picture_url: URL of the profile picture.
List Instagram Account Media
Description: Retrieves a list of media posts from an Instagram account.
Parameters/Fields:
fields (optional): Comma-separated list of fields to return (e.g., media_url,like_count).
limit: Limit the number of media posts to return.
Response:
data: List of media posts. Each media post includes information such as:
id: Media post ID.
caption: Post caption.
comments_count: Number of comments.
like_count: Number of likes.
media_product_type: Type of media (e.g., FEED).
media_type: Media type (e.g., IMAGE).
permalink: Permanent URL of the post.
shortcode: Shortcode of the post.
timestamp: Post timestamp.
username: Instagram username.
media_url: Media URL.
paging: Pagination information to retrieve more media posts.
List Live Media from Instagram Account
Description: Retrieves information about live media (live broadcasts) from an Instagram account.
Parameters/Fields ::
fields (optional): Comma-separated list of fields to return (e.g., media_url,like_count).
Response:
id: Live media ID.
media_url: URL of the live broadcast.
viewer_count: Number of viewers of the live broadcast.
comments_count: Number of comments on the live broadcast.
like_count: Number of likes on the live broadcast.
timestamp: Live timestamp.
Get Instagram Media Details
Description: Retrieves detailed information about a specific media post from an Instagram account.
Parameters/Fields:
id: Media post ID (required).
fields (optional): Comma-separated list of fields to return (e.g., comments_count,like_count).
Response:
Detailed information of the media post, including:
id: Media post ID.
caption: Post caption.
comments_count: Number of comments.
like_count: Number of likes.
media_product_type: Type of media (e.g., FEED).
media_type: Media type (e.g., IMAGE).
permalink: Permanent URL of the post.
shortcode: Shortcode of the post.
timestamp: Post timestamp.
username: Instagram username.
media_url: Media URL.
List Comment Replies on Instagram
Description: Retrieves a list of comment replies for a specific comment on an Instagram post.
Parameters/Fields:
comment_id: Comment ID (required).
fields (optional): Comma-separated list of fields to return (e.g., time_stamp,text).
Response:
id: Comment reply ID.
text: Text of the comment reply.
time_stamp: Timestamp of the comment reply.
like_count: Number of likes.
from: Information about the user who replied to the comment (includes id, username).
Reply to Comment on Instagram
Description: Replies to a comment on an Instagram post.
Parameters/Fields:
comment_id: Comment ID (required).
message: Message of the comment reply (required).
Response:
id: Comment reply ID.
Hide Comment on Instagram
Description: Hides a comment on an Instagram post.
Parameters/Fields:
comment_id: Comment ID (required).
Response:
Success or error message.
Delete Comment on Instagram
Description: Deletes a comment on an Instagram post.
Parameters/Fields:
comment_id: Comment ID (required).
Response:
Success or error message.
Video Tutorial
Reply to Comment on Instagram
This action allows you to reply to a comment on an Instagram post. Additionally, it includes an option to save the comment reply as a bot message, making it visible in the chat history.
Parameters/Fields
comment_id: Comment ID (required).
message: Message of the comment reply (required).
Save as Bot Message: When enabled, the comment will be added to chat messages but not for previous training.
Step-by-Step Guide
Step 1: Adding the Reply to Comment Action
Navigate to the flow editor and select the Instagram API.
Choose the "Reply to Comment" action.
Connect the flow with your Comment Keyword Automation. (additional documentation: Comment Keywords )
Step 2: Configuring the Action
In the action settings, enter the Comment ID.
Input the Message that will be sent as a reply.
Enable the "Save as Bot Message" option if you want the reply to appear in chat history.
(Refer to Image 2: Action Configuration Panel)
Step 3: Viewing the Comment in Chat History
Once the bot replies, navigate to the chat history.
The bot’s reply will be displayed in the conversation thread.
This allows for better tracking and reference of bot responses.
This ensures that bot-generated replies to Instagram comments are logged within the chat history for better visibility and tracking.