Snapchat API
Post to Snapchat with Late API - Stories, Saved Stories, and Spotlight content
Quick Start
Post to Snapchat in under 60 seconds:
curl -X POST https://getlate.dev/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mediaItems": [
{"url": "https://example.com/video.mp4"}
],
"platforms": [{
"platform": "snapchat",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"contentType": "story"
}
}],
"publishNow": true
}'const response = await fetch('https://getlate.dev/api/v1/posts', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mediaItems: [
{ url: 'https://example.com/video.mp4' }
],
platforms: [{
platform: 'snapchat',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
contentType: 'story'
}
}],
publishNow: true
})
});
const { post } = await response.json();
console.log('Posted to Snapchat!', post._id);import requests
response = requests.post(
'https://getlate.dev/api/v1/posts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'mediaItems': [
{'url': 'https://example.com/video.mp4'}
],
'platforms': [{
'platform': 'snapchat',
'accountId': 'YOUR_ACCOUNT_ID',
'platformSpecificData': {
'contentType': 'story'
}
}],
'publishNow': True
}
)
post = response.json()
print(f"Posted to Snapchat! {post['post']['_id']}")Overview
Snapchat supports three content types through the Public Profile API: Stories, Saved Stories, and Spotlight. A Public Profile is required to publish content via the API.
| Feature | Support |
|---|---|
| Stories | Ephemeral content (24 hours) |
| Saved Stories | Permanent content on Public Profile |
| Spotlight | Video feed (similar to TikTok) |
| Text-only posts | Not supported |
| Scheduling | Yes |
| Analytics | Views, screenshots, shares, completion rate |
Content Types
Snapchat offers three distinct content types:
| Type | Description | Duration | Caption Support |
|---|---|---|---|
story | Ephemeral snap visible for 24 hours | Temporary | No caption |
saved_story | Permanent story on Public Profile | Permanent | Title (max 45 chars) |
spotlight | Video in Snapchat's entertainment feed | Permanent | Description (max 160 chars) |
Media Requirements
Important: Media is required for all Snapchat posts. Text-only posts are not supported.
Images
| Property | Requirement |
|---|---|
| Formats | JPEG, PNG |
| Max File Size | 20 MB |
| Recommended Dimensions | 1080 × 1920 px |
| Aspect Ratio | 9:16 (portrait) |
Videos
| Property | Requirement |
|---|---|
| Format | MP4 |
| Max File Size | 500 MB |
| Duration | 5-60 seconds |
| Min Resolution | 540 × 960 px |
| Recommended Dimensions | 1080 × 1920 px |
| Aspect Ratio | 9:16 (portrait) |
Note: Media is automatically encrypted using AES-256-CBC before upload to Snapchat.
Story Posts
Stories are ephemeral content visible for 24 hours. No caption or text is supported.
curl -X POST https://getlate.dev/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mediaItems": [
{"url": "https://example.com/image.jpg"}
],
"platforms": [{
"platform": "snapchat",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"contentType": "story"
}
}],
"publishNow": true
}'const response = await fetch('https://getlate.dev/api/v1/posts', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mediaItems: [
{ url: 'https://example.com/image.jpg' }
],
platforms: [{
platform: 'snapchat',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
contentType: 'story'
}
}],
publishNow: true
})
});response = requests.post(
'https://getlate.dev/api/v1/posts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'mediaItems': [
{'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).
curl -X POST https://getlate.dev/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Behind the scenes look!",
"mediaItems": [
{"url": "https://example.com/video.mp4"}
],
"platforms": [{
"platform": "snapchat",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"contentType": "saved_story"
}
}],
"publishNow": true
}'const response = await fetch('https://getlate.dev/api/v1/posts', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: 'Behind the scenes look!',
mediaItems: [
{ url: 'https://example.com/video.mp4' }
],
platforms: [{
platform: 'snapchat',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
contentType: 'saved_story'
}
}],
publishNow: true
})
});response = requests.post(
'https://getlate.dev/api/v1/posts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'content': 'Behind the scenes look!',
'mediaItems': [
{'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.
curl -X POST https://getlate.dev/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": [
{"url": "https://example.com/sunset-video.mp4"}
],
"platforms": [{
"platform": "snapchat",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"contentType": "spotlight"
}
}],
"publishNow": true
}'const response = await fetch('https://getlate.dev/api/v1/posts', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: 'Check out this amazing sunset! #sunset #nature #viral',
mediaItems: [
{ url: 'https://example.com/sunset-video.mp4' }
],
platforms: [{
platform: 'snapchat',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
contentType: 'spotlight'
}
}],
publishNow: true
})
});response = requests.post(
'https://getlate.dev/api/v1/posts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'content': 'Check out this amazing sunset! #sunset #nature #viral',
'mediaItems': [
{'url': 'https://example.com/sunset-video.mp4'}
],
'platforms': [{
'platform': 'snapchat',
'accountId': 'YOUR_ACCOUNT_ID',
'platformSpecificData': {
'contentType': 'spotlight'
}
}],
'publishNow': True
}
)Connect a Snapchat Account
Snapchat uses OAuth for authentication and requires selecting a Public Profile to publish content.
Standard Flow
Redirect users to the Late OAuth URL:
https://getlate.dev/connect/snapchat?profileId=YOUR_PROFILE_ID&redirect_url=https://yourapp.com/callbackAfter authorization, users select a Public Profile, and Late 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://getlate.dev/api/v1/connect/snapchat?profileId=YOUR_PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=trueAfter OAuth, you'll be redirected to your redirect_url with:
tempToken- Temporary access tokenuserProfile- URL-encoded JSON with user infopublicProfiles- URL-encoded JSON array of available Public Profilesconnect_token- Short-lived token for API authenticationplatform=snapchatstep=select_public_profile
Step 2: List Public Profiles
curl -X GET "https://getlate.dev/api/v1/connect/snapchat/select-profile?profileId=YOUR_PROFILE_ID&tempToken=TEMP_TOKEN" \
-H "X-Connect-Token: CONNECT_TOKEN"const response = await fetch(
`https://getlate.dev/api/v1/connect/snapchat/select-profile?profileId=${profileId}&tempToken=${tempToken}`,
{
headers: { 'X-Connect-Token': connectToken }
}
);
const { publicProfiles } = await response.json();
// Display profiles in your custom UIresponse = requests.get(
'https://getlate.dev/api/v1/connect/snapchat/select-profile',
params={'profileId': 'YOUR_PROFILE_ID', 'tempToken': temp_token},
headers={'X-Connect-Token': connect_token}
)
public_profiles = response.json()['publicProfiles']
# Display profiles in your custom UIResponse:
{
"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
curl -X POST https://getlate.dev/api/v1/connect/snapchat/select-profile \
-H "X-Connect-Token: CONNECT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"profileId": "YOUR_LATE_PROFILE_ID",
"selectedPublicProfile": {
"id": "abc123-def456",
"display_name": "My Brand",
"username": "mybrand"
},
"tempToken": "TEMP_TOKEN",
"userProfile": {
"id": "user123",
"username": "mybrand",
"displayName": "My Brand"
}
}'const response = await fetch('https://getlate.dev/api/v1/connect/snapchat/select-profile', {
method: 'POST',
headers: {
'X-Connect-Token': connectToken,
'Content-Type': 'application/json'
},
body: JSON.stringify({
profileId: 'YOUR_LATE_PROFILE_ID',
selectedPublicProfile: {
id: 'abc123-def456',
display_name: 'My Brand',
username: 'mybrand'
},
tempToken: tempToken,
userProfile: userProfile
})
});
const { account } = await response.json();
console.log('Connected:', account._id);response = requests.post(
'https://getlate.dev/api/v1/connect/snapchat/select-profile',
headers={
'X-Connect-Token': connect_token,
'Content-Type': 'application/json'
},
json={
'profileId': 'YOUR_LATE_PROFILE_ID',
'selectedPublicProfile': {
'id': 'abc123-def456',
'display_name': 'My Brand',
'username': 'mybrand'
},
'tempToken': temp_token,
'userProfile': user_profile
}
)
account = response.json()['account']
print(f"Connected: {account['_id']}")Response:
{
"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"
}
}Platform-Specific Options
| Option | Type | Default | Description |
|---|---|---|---|
contentType | string | story | Content type: story, saved_story, or spotlight |
Caption/Title Limits
| Content Type | Text Field | Limit |
|---|---|---|
| Story | N/A | No text supported |
| Saved Story | Title | 45 characters |
| Spotlight | Description | 160 characters (hashtags supported) |
Analytics
Snapchat provides analytics for your content. Available metrics include:
| Metric | Description |
|---|---|
| Views | Total number of views |
| Unique Viewers | Number of unique users who viewed |
| Screenshots | Number of screenshots taken |
| Shares | Number of times shared |
| Completion Rate | Percentage of viewers who watched to the end |
Analytics are fetched per content type (story, saved_story, spotlight).
Common Issues
"Public Profile required"
Snapchat requires a Public Profile to publish content via the API. During the connection flow, you must select a Public Profile to use.
"Media is required"
Snapchat does not support text-only posts. All posts must include either an image or video.
"Only one media item supported"
Snapchat only supports single media items per post. Carousels or albums are not supported.
Video rejected
- Check duration (must be 5-60 seconds)
- Verify format (MP4 required)
- Ensure minimum resolution (540 × 960 px)
- Confirm file size is under 500 MB
"Title too long" (Saved Stories)
Saved Story titles are limited to 45 characters. Truncate your content or use a shorter title.
"Description too long" (Spotlight)
Spotlight descriptions are limited to 160 characters including hashtags.
Related API Endpoints
- Connect Snapchat Account — OAuth connection flow
- Create Post — Post creation and scheduling
- Upload Media — Image and video uploads
- Analytics — Fetch post analytics