โ† All skills
Tencent SkillHub ยท Developer Tools

Instagram Page

Instagram Business manager: post photos, reels, stories & get insights. Requires: powershell/pwsh. Reads ~/.config/instagram-page/credentials.json (IG_ACCESS...

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Instagram Business manager: post photos, reels, stories & get insights. Requires: powershell/pwsh. Reads ~/.config/instagram-page/credentials.json (IG_ACCESS...

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, _meta.json

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.1

Documentation

ClawHub primary doc Primary doc: SKILL.md 9 sections Open source page

instagram-page - Universal Instagram Graph API Skill

Constructs and executes Instagram Graph API calls inline based on what the user wants. No scripts needed. Requires an Instagram Business or Creator account linked to a Facebook Page. Personal Instagram accounts are not supported by the Instagram Graph API. API version: v25.0 Base URL: https://graph.facebook.com/v25.0

STEP 1 - Load Credentials

Credentials are stored in ~/.config/instagram-page/credentials.json. $cfg = Get-Content "$HOME/.config/instagram-page/credentials.json" -Raw | ConvertFrom-Json $token = $cfg.IG_ACCESS_TOKEN $igUserId = $cfg.IG_USER_ID If the file does not exist, guide setup. Required fields: FieldPurposeIG_ACCESS_TOKENLong-lived User access token - used for all API callsIG_USER_IDInstagram-scoped Business/Creator User ID (numeric)IG_APP_IDMeta App ID - only needed during token exchangeIG_APP_SECRETMeta App Secret - only needed during token exchange Prerequisites: Instagram account must be a Business or Creator account The Instagram account must be linked to a Facebook Page A Meta App with instagram_basic, instagram_content_publish, instagram_manage_comments, instagram_manage_insights permissions One-time token exchange setup: # Provide: $appId, $appSecret, $shortToken (from Graph API Explorer with IG permissions), $fbPageId # 1. Exchange short-lived token for long-lived user token (valid 60 days) $r1 = Invoke-RestMethod "https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=$appId&client_secret=$appSecret&fb_exchange_token=$shortToken" $longToken = $r1.access_token # 2. Get Instagram Business Account ID linked to your Facebook Page $r2 = Invoke-RestMethod "https://graph.facebook.com/v25.0/$fbPageId?fields=instagram_business_account&access_token=$longToken" $igUserId = $r2.instagram_business_account.id # 3. Save - only these four fields @{ IG_USER_ID = $igUserId IG_ACCESS_TOKEN = $longToken IG_APP_ID = $appId IG_APP_SECRET = $appSecret } | ConvertTo-Json | Set-Content "$HOME/.config/instagram-page/credentials.json" -Encoding UTF8 Restrict file permissions immediately after saving: # Windows icacls "$HOME/.config/instagram-page/credentials.json" /inheritance:r /grant:r "$($env:USERNAME):(R,W)" # macOS / Linux # chmod 600 ~/.config/instagram-page/credentials.json Refresh token before it expires (every ~50 days): $r = Invoke-RestMethod "https://graph.facebook.com/oauth/access_token?grant_type=ig_refresh_token&access_token=$token" $cfg.IG_ACCESS_TOKEN = $r.access_token $cfg | ConvertTo-Json | Set-Content "$HOME/.config/instagram-page/credentials.json" -Encoding UTF8 Delete IG_APP_SECRET from credentials.json after setup - it is not needed for API calls. Never commit this file to version control. It contains long-lived secrets. This skill makes no external calls other than to graph.facebook.com. No data is forwarded to third parties.

STEP 2 - Figure Out the API Call

Instagram publishing uses a two-step flow for most media types: Create a media container - uploads/registers the media, returns a creation_id Publish the container - makes it live on Instagram

Common Endpoints

What user wantsMethodEndpointPost single photoPOST x2Step 1: /$igUserId/media Step 2: /$igUserId/media_publishPost reel (video)POST x2Step 1: /$igUserId/media (media_type=REELS) Step 2: /$igUserId/media_publishPost storyPOST x2Step 1: /$igUserId/media (media_type=STORIES) Step 2: /$igUserId/media_publishPost carouselPOST x3+Step 1: item containers Step 2: carousel container Step 3: publishGet recent mediaGET/$igUserId/media?fields=id,caption,media_type,timestamp,like_count,comments_countGet account infoGET/$igUserId?fields=username,name,biography,followers_count,media_countGet commentsGET/{media-id}/comments?fields=text,username,timestampReply to commentPOST/{comment-id}/replies body: messageDelete commentDELETE/{comment-id}Hide/show commentPOST/{comment-id} body: hide=true/falseGet media insightsGET/{media-id}/insights?metric=impressions,reach,likes,comments,shares,savedGet account insightsGET/$igUserId/insights?metric=impressions,reach,follower_count&period=dayGet hashtag IDGETig/hashtags?user_id=$igUserId&q=hashtagSearch hashtag mediaGET/{hashtag-id}/top_media?user_id=$igUserId&fields=id,caption,media_typeGet tagged mediaGET/$igUserId/tags?fields=caption,media_url,timestamp

API Call Patterns

GET: $result = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/ENDPOINT?access_token=$token" -ErrorAction Stop POST (form body): $result = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/ENDPOINT" -Method POST ` -Body @{ field1="value1"; field2="value2"; access_token=$token } -ErrorAction Stop DELETE: $result = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/{id}?access_token=$token" -Method DELETE -ErrorAction Stop

Publishing Patterns

Single photo post: # image_url must be publicly accessible $container = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media" -Method POST ` -Body @{ image_url=$imageUrl; caption=$caption; access_token=$token } -ErrorAction Stop $post = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media_publish" -Method POST ` -Body @{ creation_id=$container.id; access_token=$token } -ErrorAction Stop Write-Host "Published post ID: $($post.id)" Reel post (video): # video_url must be publicly accessible MP4 (H.264, AAC audio, max 1GB, max 60s for feed) $container = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media" -Method POST ` -Body @{ media_type="REELS"; video_url=$videoUrl; caption=$caption; share_to_feed="true"; access_token=$token } -ErrorAction Stop # Poll for processing status - video upload is async do { Start-Sleep -Seconds 5 $status = Invoke-RestMethod "https://graph.facebook.com/v25.0/$($container.id)?fields=status_code&access_token=$token" } while ($status.status_code -eq "IN_PROGRESS") if ($status.status_code -ne "FINISHED") { throw "Video processing failed: $($status.status_code)" } $post = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media_publish" -Method POST ` -Body @{ creation_id=$container.id; access_token=$token } -ErrorAction Stop Write-Host "Published reel ID: $($post.id)" Carousel post (2-10 images/videos): # Create item containers for each media URL $itemIds = @() foreach ($url in $mediaUrls) { $item = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media" -Method POST ` -Body @{ image_url=$url; is_carousel_item="true"; access_token=$token } -ErrorAction Stop $itemIds += $item.id } # Create carousel container $carousel = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media" -Method POST ` -Body @{ media_type="CAROUSEL"; children=($itemIds -join ","); caption=$caption; access_token=$token } -ErrorAction Stop # Publish $post = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media_publish" -Method POST ` -Body @{ creation_id=$carousel.id; access_token=$token } -ErrorAction Stop Write-Host "Published carousel ID: $($post.id)" Story: $container = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media" -Method POST ` -Body @{ media_type="STORIES"; image_url=$imageUrl; access_token=$token } -ErrorAction Stop $post = Invoke-RestMethod -Uri "https://graph.facebook.com/v25.0/$igUserId/media_publish" -Method POST ` -Body @{ creation_id=$container.id; access_token=$token } -ErrorAction Stop Write-Host "Published story ID: $($post.id)" Image/video URLs must be publicly accessible - local files are not accepted by the API. Upload to a public server or CDN before calling. Instagram limits ~50 API-published posts per 24h.

STEP 3 - Handle Errors

try { # ... API call ... } catch { $err = $_.ErrorDetails.Message | ConvertFrom-Json -ErrorAction SilentlyContinue $code = $err.error.code $subcode = $err.error.error_subcode $msg = $err.error.message Write-Host "Error $code/$subcode : $msg" } CodeSubcodeMeaningFix100-Invalid parameterCheck parameter values; image/video URL must be public102-Session expiredRefresh token - run the refresh snippet in STEP 1190460Token expired (60 days)Refresh token - run the refresh snippet in STEP 1190467Invalid tokenRe-run full setup to get a new token200-Permission deniedAdd the missing permission to your Meta App and regenerate token10-Permission denied (IG scope)Add permission listed in error.message; re-run setup24-No linked IG Business accountLink Instagram account to your Facebook Page in Instagram settings32-Page request limit reachedWait and retry; hourly rate limit hit368-Temporarily blockedWait and retry; account may be temporarily restricted9007-Publishing limit reachedInstagram limits ~50 API-published posts per 24h2207026-Video format invalidMP4 required; H.264 video, AAC audio, max 1GB, 60s for feed reels

Permissions Reference

PermissionRequired forinstagram_basicRead account info, media listinstagram_content_publishCreate and publish posts, reels, stories, carouselsinstagram_manage_commentsRead, reply to, hide, delete commentsinstagram_manage_insightsAccess account and media insightspages_show_listList Facebook Pages (needed during IG account lookup)pages_read_engagementRead Facebook Page linked to Instagram account If a permission is missing: Go to Meta for Developers Select your app -> Permissions and Features Add the required permission Regenerate token via Graph API Explorer with the permission checked Re-run setup with the new token

AGENT RULES

Always load credentials first. If missing or incomplete, guide setup. Only use IG_ACCESS_TOKEN and IG_USER_ID for API calls. IG_APP_ID and IG_APP_SECRET are for token exchange only. Delete IG_APP_SECRET from credentials.json after token exchange - it is not needed for API calls. Token expiry: IG_ACCESS_TOKEN expires every 60 days. Remind the user to refresh before expiry using the refresh snippet in STEP 1. Rotate immediately if the host is ever compromised. Two-step publishing: always create a container first, then publish. Never try to publish in a single API call. Public URLs only: image/video URLs must be publicly accessible. If the user provides a local file path, tell them to upload it to a public server or CDN first. Reel processing: poll status_code until FINISHED before publishing - video processing is async and can take minutes. Least-privilege: only request the permissions the use case needs. All API calls go to graph.facebook.com only. No external forwarding, no third-party services. Construct API calls inline from user intent - do not look for script files. On any error: parse error.code + error.error_subcode, map to the table above, tell the user exactly what to do. If a permission is missing: name it, link to Meta for Developers, say to re-run setup. Business/Creator only: if the user has a personal Instagram account, tell them to convert it to Business or Creator in Instagram settings first - personal accounts are not supported by the Instagram Graph API.

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
1 Docs1 Config
  • SKILL.md Primary doc
  • _meta.json Config