Skip to content

Snapchat API

Schedule and automate Snapchat posts with Zernio API - Stories, Saved Stories, Spotlight content, and Public Profile management

Quick Reference

PropertyValue
Title limit45 chars (Saved Stories)
Description limit160 chars (Spotlight, including hashtags)
Media per post1 (single image or video only)
Image formatsJPEG, PNG
Image max size20 MB
Video formatMP4 only
Video max size500 MB
Video duration5-60 seconds
Post typesStory, Saved Story, Spotlight
SchedulingYes
InboxNo
AnalyticsYes (views, viewers, screenshots, shares)

Before You Start

Snapchat requires a Public Profile to publish content. Regular accounts cannot use the API. Also: Snapchat only supports 1 media item per post -- no carousels, no albums. This is the most restrictive platform for content format.

Additional requirements:

  • Public Profile required (Person, Business, or Official)
  • Single media item only (most restrictive platform)
  • No text-only posts
  • 9:16 vertical orientation practically required
  • Media is encrypted (AES-256-CBC) before upload (handled by Zernio)

Quick Start

Post to Snapchat in under 60 seconds:

typescript
const { post } = await zernio.posts.createPost({
  mediaItems: [
    { type: 'video', url: 'https://example.com/video.mp4' }
  ],
  platforms: [{
    platform: 'snapchat',
    accountId: 'YOUR_ACCOUNT_ID',
    platformSpecificData: {
      contentType: 'story'
    }
  }],
  publishNow: true
});
console.log('Posted to Snapchat!', post._id);
python
result = client.posts.create_post(
    media_items=[
        {"type": "video", "url": "https://example.com/video.mp4"}
    ],
    platforms=[{
        "platform": "snapchat",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
            "contentType": "story"
        }
    }],
    publish_now=True
)
post = result.post
print(f"Posted to Snapchat! {post['_id']}")
bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaItems": [
      {"type": "video", "url": "https://example.com/video.mp4"}
    ],
    "platforms": [{
      "platform": "snapchat",
      "accountId": "YOUR_ACCOUNT_ID",
      "platformSpecificData": {
        "contentType": "story"
      }
    }],
    "publishNow": true
  }'

Content Types

Snapchat supports three content types through the Public Profile API:

TypeDescriptionDurationText Support
storyEphemeral snap visible for 24 hoursTemporaryNo caption
saved_storyPermanent story on Public ProfilePermanentTitle (max 45 chars)
spotlightVideo in Snapchat's entertainment feedPermanentDescription (max 160 chars, hashtags supported)

Story Posts

Stories are ephemeral content visible for 24 hours. No caption or text is supported.

typescript
const { post } = await zernio.posts.createPost({
  mediaItems: [
    { type: 'image', url: 'https://example.com/image.jpg' }
  ],
  platforms: [{
    platform: 'snapchat',
    accountId: 'YOUR_ACCOUNT_ID',
    platformSpecificData: {
      contentType: 'story'
    }
  }],
  publishNow: true
});
console.log('Posted to Snapchat!', post._id);
python
result = client.posts.create_post(
    media_items=[
        {"type": "image", "url": "https://example.com/image.jpg"}
    ],
    platforms=[{
        "platform": "snapchat",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
            "contentType": "story"
        }
    }],
    publish_now=True
)
post = result.post
print(f"Posted to Snapchat! {post['_id']}")
bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaItems": [
      {"type": "image", "url": "https://example.com/image.jpg"}
    ],
    "platforms": [{
      "platform": "snapchat",
      "accountId": "YOUR_ACCOUNT_ID",
      "platformSpecificData": {
        "contentType": "story"
      }
    }],
    "publishNow": true
  }'

Saved Story Posts

Saved Stories are permanent content displayed on your Public Profile. The post content is used as the title (max 45 characters).

typescript
const { post } = await zernio.posts.createPost({
  content: 'Behind the scenes look!',
  mediaItems: [
    { type: 'video', url: 'https://example.com/video.mp4' }
  ],
  platforms: [{
    platform: 'snapchat',
    accountId: 'YOUR_ACCOUNT_ID',
    platformSpecificData: {
      contentType: 'saved_story'
    }
  }],
  publishNow: true
});
console.log('Posted to Snapchat!', post._id);
python
result = client.posts.create_post(
    content="Behind the scenes look!",
    media_items=[
        {"type": "video", "url": "https://example.com/video.mp4"}
    ],
    platforms=[{
        "platform": "snapchat",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
            "contentType": "saved_story"
        }
    }],
    publish_now=True
)
post = result.post
print(f"Posted to Snapchat! {post['_id']}")
bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Behind the scenes look!",
    "mediaItems": [
      {"type": "video", "url": "https://example.com/video.mp4"}
    ],
    "platforms": [{
      "platform": "snapchat",
      "accountId": "YOUR_ACCOUNT_ID",
      "platformSpecificData": {
        "contentType": "saved_story"
      }
    }],
    "publishNow": true
  }'

Spotlight Posts

Spotlight is Snapchat's TikTok-like entertainment feed. Only video content is supported. The post content is used as the description (max 160 characters) and can include hashtags.

typescript
const { post } = await zernio.posts.createPost({
  content: 'Check out this amazing sunset! #sunset #nature #viral',
  mediaItems: [
    { type: 'video', url: 'https://example.com/sunset-video.mp4' }
  ],
  platforms: [{
    platform: 'snapchat',
    accountId: 'YOUR_ACCOUNT_ID',
    platformSpecificData: {
      contentType: 'spotlight'
    }
  }],
  publishNow: true
});
console.log('Posted to Snapchat!', post._id);
python
result = client.posts.create_post(
    content="Check out this amazing sunset! #sunset #nature #viral",
    media_items=[
        {"type": "video", "url": "https://example.com/sunset-video.mp4"}
    ],
    platforms=[{
        "platform": "snapchat",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
            "contentType": "spotlight"
        }
    }],
    publish_now=True
)
post = result.post
print(f"Posted to Snapchat! {post['_id']}")
bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out this amazing sunset! #sunset #nature #viral",
    "mediaItems": [
      {"type": "video", "url": "https://example.com/sunset-video.mp4"}
    ],
    "platforms": [{
      "platform": "snapchat",
      "accountId": "YOUR_ACCOUNT_ID",
      "platformSpecificData": {
        "contentType": "spotlight"
      }
    }],
    "publishNow": true
  }'

Media Requirements

Media is required for all Snapchat posts. Text-only posts are not supported.

Images

PropertyRequirement
FormatsJPEG, PNG
Max File Size20 MB
Recommended Dimensions1080 x 1920 px
Aspect Ratio9:16 (portrait)

Videos

PropertyRequirement
FormatMP4
Max File Size500 MB
Duration5-60 seconds
Min Resolution540 x 960 px
Recommended Dimensions1080 x 1920 px
Aspect Ratio9:16 (portrait)

Media is automatically encrypted using AES-256-CBC before upload to Snapchat. This is handled entirely by Zernio.

Platform-Specific Fields

FieldTypeDefaultDescription
contentTypestring"story"Content type: "story", "saved_story", or "spotlight"

Connection

Snapchat uses OAuth for authentication and requires selecting a Public Profile to publish content.

Standard Flow

Redirect users to the Zernio OAuth URL:

https://zernio.com/connect/snapchat?profileId=YOUR_PROFILE_ID&redirect_url=https://yourapp.com/callback

After authorization, users select a Public Profile, and Zernio redirects back to your redirect_url with connection details.

Headless Mode (Custom UI)

Build your own fully-branded Public Profile selector:

Step 1: Initiate OAuth

https://zernio.com/api/v1/connect/snapchat?profileId=YOUR_PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true

After OAuth, you'll be redirected to your redirect_url with:

  • tempToken - Temporary access token
  • userProfile - URL-encoded JSON with user info
  • publicProfiles - URL-encoded JSON array of available Public Profiles
  • connect_token - Short-lived token for API authentication
  • platform=snapchat
  • step=select_public_profile

Step 2: List Public Profiles

python
result = client.connect.list_snapchat_profiles(
    profile_id="YOUR_PROFILE_ID",
    temp_token=temp_token,
    x_connect_token=connect_token
)
public_profiles = result['publicProfiles']
# Display profiles in your custom UI
bash
curl -X GET "https://zernio.com/api/v1/connect/snapchat/select-profile?profileId=YOUR_PROFILE_ID&tempToken=TEMP_TOKEN" \
  -H "X-Connect-Token: CONNECT_TOKEN"

Response:

json
{
  "publicProfiles": [
    {
      "id": "abc123-def456",
      "display_name": "My Brand",
      "username": "mybrand",
      "profile_image_url": "https://cf-st.sc-cdn.net/...",
      "subscriber_count": 15000
    },
    {
      "id": "xyz789-uvw012",
      "display_name": "Side Project",
      "username": "sideproject",
      "profile_image_url": "https://cf-st.sc-cdn.net/...",
      "subscriber_count": 5000
    }
  ]
}

Step 3: Select Public Profile

python
result = client.connect.select_snapchat_profile(
    profile_id="YOUR_PROFILE_ID",
    selected_public_profile={
        "id": "abc123-def456",
        "display_name": "My Brand",
        "username": "mybrand"
    },
    temp_token=temp_token,
    user_profile=user_profile,
    x_connect_token=connect_token
)
print(f"Connected: {result['account']['_id']}")
bash
curl -X POST https://zernio.com/api/v1/connect/snapchat/select-profile \
  -H "X-Connect-Token: CONNECT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "YOUR_PROFILE_ID",
    "selectedPublicProfile": {
      "id": "abc123-def456",
      "display_name": "My Brand",
      "username": "mybrand"
    },
    "tempToken": "TEMP_TOKEN",
    "userProfile": {
      "id": "user123",
      "username": "mybrand",
      "displayName": "My Brand"
    }
  }'

Response:

json
{
  "message": "Snapchat connected successfully with public profile",
  "account": {
    "platform": "snapchat",
    "username": "mybrand",
    "displayName": "My Brand",
    "profilePicture": "https://cf-st.sc-cdn.net/...",
    "isActive": true,
    "publicProfileName": "My Brand"
  }
}

Analytics

> Included — Analytics is bundled with every paid account on the Usage plan.

Available metrics via the Analytics API:

MetricAvailable
Reach (unique viewers)
Shares
Views
Screenshots
Completion Rate

Analytics are fetched per content type (story, saved_story, spotlight).

typescript
const analytics = await zernio.analytics.getAnalytics({
  platform: 'snapchat',
  fromDate: '2024-01-01',
  toDate: '2024-01-31'
});
console.log(analytics.posts);
python
analytics = client.analytics.get_analytics(
    platform="snapchat",
    from_date="2024-01-01",
    to_date="2024-01-31"
)
print(analytics["posts"])
bash
curl "https://zernio.com/api/v1/analytics?platform=snapchat&fromDate=2024-01-01&toDate=2024-01-31" \
  -H "Authorization: Bearer YOUR_API_KEY"

What You Can't Do

These features are not available through Snapchat's API:

  • Use AR lenses or filters
  • Create ads
  • Access Snap Map features
  • Use Snapchat sounds
  • Create collaborative stories
  • Access friend stories
  • Send DMs or read comments
  • Post text-only content (media required)
  • Post multiple media items (single item only)

Common Errors

ErrorMeaningFix
"Public Profile required"Account does not have a Public Profile set upEnsure the Snapchat account has a Public Profile (Person, Business, or Official) and select it during the connection flow.
"Media is required"Post was submitted without any mediaAdd an image or video. Snapchat does not support text-only posts.
"Only one media item supported"Multiple media items were includedRemove extra media items. Snapchat only supports a single image or video per post.
Video rejectedVideo does not meet Snapchat's requirementsCheck duration (5-60 sec), format (MP4 only), minimum resolution (540 x 960 px), and file size (under 500 MB).
"Title too long" (Saved Stories)Title exceeds 45 charactersShorten the content field to 45 characters or fewer.
"Description too long" (Spotlight)Description exceeds 160 charactersShorten the content field to 160 characters or fewer, including hashtags.

Inbox

Snapchat does not have inbox features available via API.

  • No DMs - Snapchat's messaging API is not available for third-party apps
  • No comments - Snap comments are not accessible via API
  • Connect Snapchat Account - OAuth connection flow
  • Create Post - Post creation and scheduling
  • Upload Media - Image and video uploads
  • Analytics - Fetch post analytics