Skip to main content
Available Instagram is the first fully supported connector. It uses the Meta Graph API for comments and DMs.

Details

FieldValue
Platform sluginstagram
Auth typeOAuth 2.0 (Meta)
APIMeta Graph API

Feature support

FeatureSupportedNotes
List postsReturns posts, reels, carousels
CommentsScoped to a specific post
Reply to comment
Private replySends a DM to the commenter
Comment replies (thread)
Moderate comment (hide/unhide/delete)
Toggle post comments
DMs
Send DM
Get DM thread by user
Reviews-Instagram has no review feature
Mentions
Create postImages, videos, reels, carousels
Delete post

Connecting

curl -X POST https://api.social-api.ai/v1/accounts/connect \
  -H "Authorization: Bearer $SOCAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "metadata": {
      "redirect_uri": "https://app.example.com/oauth/callback"
    }
  }'
Response:
{
  "auth_url": "https://www.instagram.com/oauth/authorize?client_id=...&state=...",
  "state": "4a8f2c1e9b3d7f06a5c2e8b4d1f3a7e2"
}
Redirect your user to auth_url. After they authorize, Instagram redirects to your redirect_uri with ?code=...&state=.... Then call:
curl -X POST https://api.social-api.ai/v1/oauth/exchange \
  -H "Authorization: Bearer $SOCAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "code": "AQDtbPB9X...",
    "metadata": {
      "state": "4a8f2c1e9b3d7f06a5c2e8b4d1f3a7e2",
      "redirect_uri": "https://app.example.com/oauth/callback"
    }
  }'

Sample: List posts

curl "https://api.social-api.ai/v1/accounts/{id}/posts?limit=10" \
  -H "Authorization: Bearer $SOCAPI_KEY"
Sample response:
{
  "data": [
    {
      "id": "17895695668004550",
      "platform": "instagram",
      "caption": "Hello world #socapi",
      "media_type": "IMAGE",
      "media_url": "https://scontent-...",
      "permalink": "https://www.instagram.com/p/ABC123/",
      "timestamp": "2026-03-01T12:00:00Z",
      "like_count": 42,
      "comments_count": 5,
      "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
    }
  ],
  "count": 1
}

Sample: List comments on a post

Comments are scoped to a specific post. Use the post id from the response above:
curl "https://api.social-api.ai/v1/accounts/{id}/posts/17895695668004550/comments?limit=10" \
  -H "Authorization: Bearer $SOCAPI_KEY"
Sample response:
{
  "data": [
    {
      "id": "sapi_cmt_aW5zdGFncmFtOjE3ODQxNDA1NzkzMTg3MjE4",
      "platform": "instagram",
      "type": "comment",
      "author": {
        "id": "17841405793187218",
        "name": "Jane Smith",
        "avatar_url": "https://example.com/avatar.jpg"
      },
      "content": {
        "text": "Love this product!",
        "media": []
      },
      "metadata": {
        "post_id": "17895695668004550"
      },
      "created_at": "2026-02-15T14:30:00Z",
      "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
      "platform_id": "17841405793187218"
    }
  ],
  "count": 1
}

Sample: List DMs

curl "https://api.social-api.ai/v1/accounts/{id}/dms?limit=10" \
  -H "Authorization: Bearer $SOCAPI_KEY"
Sample response:
{
  "data": [
    {
      "id": "sapi_dm_aW5zdGFncmFtOnQxNzg0MTA1NzkzMTg3MjE4",
      "platform": "instagram",
      "type": "dm",
      "author": {
        "id": "17841405793187218",
        "name": "Jane Smith",
        "avatar_url": "https://example.com/avatar.jpg"
      },
      "content": {
        "text": "Hi, I have a question about my order",
        "media": []
      },
      "metadata": {
        "thread_id": "t_17841405793187218"
      },
      "created_at": "2026-02-15T15:00:00Z",
      "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
      "platform_id": "t_17841405793187218"
    }
  ],
  "count": 1
}

Publishing

Create an Instagram post with optional platform-specific fields:
curl -X POST https://api.social-api.ai/v1/posts \
  -H "Authorization: Bearer $SOCAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account_ids": ["acc_01HZ9X3Q4R5M6N7P8V2K0W1J"],
    "text": "Hello world #socapi",
    "media_ids": ["https://cdn.example.com/photo.jpg"],
    "platform_data": {
      "instagram": {
        "alt_text": "A product photo showing our new widget",
        "share_to_feed": true
      }
    }
  }'
For the full field reference, media constraints, and error recovery, see Instagram posts.

Notes

  • Private replies - Replying to a comment with "private": true sends a DM to the commenter. This is Instagram’s native “Send Private Reply” feature, not a SocialAPI workaround.
  • Token expiry - Instagram access tokens can expire. If you receive 401 with code: "invalid_token", reconnect the account using the OAuth flow.
  • Required permissions - Your Meta App must have these scopes approved: instagram_business_basic, instagram_business_manage_comments, instagram_business_manage_messages, instagram_business_content_publish.