Quick reference
| Property | Value |
|---|---|
| Platform value | instagram |
| One connected account | One Instagram professional (business or creator) account. |
| Text limit | 2,200 characters |
| Supported | One JPEG image |
| Features | Posting ✓ · Analytics ✓ · Inbox ✓ |
| Provider approval | Meta review; professional account |
| Login type | Instagram Login (separate Instagram app ID and secret) |
| Token | Long-lived (60 days), extended automatically before it expires |
Before you start
The person connecting needs:
- An Instagram professional account (Business or Creator). Personal accounts cannot connect.
- While your Meta app is in Development mode: added as an Instagram tester, invite accepted.
You (the platform owner) need:
- In your Meta app add “Instagram API with Instagram Login”; copy the Instagram app ID and secret (different from the Facebook App ID).
- Request instagram_business_basic and instagram_business_content_publish.
- Business login settings → OAuth redirect URIs: https://YOUR_DOMAIN/auth/callback/instagram
- Add Instagram testers under App roles while in Development mode.
Permissions (scopes)
Techrace puts these permissions in the login link. The person approves them on the provider's own screen; only approved permissions are granted.
| Permission | Requested by default | Used for |
|---|---|---|
instagram_business_basic | Yes | Read the profile and media |
instagram_business_content_publish | Yes | Publish images |
instagram_business_manage_insights | Optional | Insights and breakdowns |
instagram_business_manage_comments | Optional | Read, reply to, hide and delete comments |
instagram_business_manage_messages | Optional | Direct messages |
Connect an account
/api/v1/projects/{project_id}/connect-sessionsconnections:writeCreate a connect link with provider "instagram" and send the person's browser to the returned url. return_url is the page in your app where they land afterwards (https, or http://localhost while testing).
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/connect-sessions" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"provider": "instagram",
"return_url": "https://your-app.com/integrations/done"
}
EOFAfter approval the person lands on your return_url with ?connected=instagram&customer_id=…&connection_id=…, or ?error=access_denied|expired|failed&provider=instagram. Your webhook also receives account.connected. Keep the connection_id: every call below uses it.
Publish a post
/api/v1/projects/{project_id}/executionsexecutions:writePublish one JPEG image with a caption.
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/executions" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-key-per-post" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"connection_id": "$CONNECTION_ID",
"action": "publish",
"input": {
"content": "New menu this week ☕️",
"media_ids": [
"$MEDIA_ID"
]
}
}
EOF- Publishing is asynchronous: the response has status queued. Poll GET /executions/{id} or subscribe to execution.succeeded / execution.failed.
- Upload images or video first with POST /customers/{customer_id}/media and pass the returned media IDs in media_ids.
- Re-sending the same Idempotency-Key never posts twice.
- Caption up to 2,200 characters.
- Exactly one JPEG image is required; text-only posts are not possible on Instagram.
Analytics
/api/v1/projects/{project_id}/analytics/queryanalytics:read| report | What it returns |
|---|---|
summary | Account summary for the period |
daily | Daily account metrics (e.g. reach) |
account_breakdown | Account metrics broken down (use breakdown) |
media_breakdown | Metrics for one post (content_id = the Instagram media ID, plus breakdown) |
audience | Follower audience |
lifetime | Lifetime metrics for one post (content_id) |
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/analytics/query" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"connection_id": "$CONNECTION_ID",
"report": "account_breakdown",
"breakdown": "follow_type",
"since": "2026-11-01",
"until": "2026-11-07"
}
EOF- Needs instagram_business_manage_insights.
Limitations
- Professional accounts only.
- Publishing: one JPEG image per post. Video, carousels, Stories and Reels publishing are not supported.
Common errors
| Error | Meaning | Fix |
|---|---|---|
instagram_basic_permission_required | instagram_business_basic was not granted. | Reconnect and approve all permissions. |
Invalid redirect_uri (Instagram screen) | Callback not registered for Instagram Login. | Add https://YOUR_DOMAIN/auth/callback/instagram in the Instagram product settings. |
access_denied | The person cancelled. | Try again and approve. |
Comments and messages
/api/v1/projects/{project_id}/inbox/queryinbox:readresource: media, comments, replies, conversations or messages.
/api/v1/projects/{project_id}/inbox/operationsinbox:read + inbox:writeaction: reply_comment, set_comment_hidden, delete_comment, reply_text, reply_image or mark_conversation_seen.