Overview
Manage your connected social media profiles
Profiles Overview
Profiles are the core concept in postcore - each profile represents one of your end-users and holds their social media connections.
What Are Profiles?
As a developer building a social media tool, you'll create a profile for each of your users. Each profile can connect to:
- One LinkedIn account
- One Bluesky account
- (More platforms coming soon)
Example: If you're building a scheduler with 100 users, you'll have 100 profiles - one per user, each with their own social media connections.
Available Platforms
Currently supported:
- LinkedIn - OAuth connection (60-day token expiry)
- Bluesky - App password (never expires)
Additional platforms like Twitter/X, Facebook, Instagram, and more are in development.
Profile Structure
{
"profileKey": "prof_abc123def456",
"profileName": "John Smith Profile",
"createdAt": "2025-01-01T12:00:00Z",
"connectedPlatforms": [
{
"platform": "linkedin",
"displayName": "John Smith",
"username": "johnsmith",
"connectedAt": "2025-01-01T12:30:00Z",
"expiresAt": "2025-03-02T12:30:00Z",
"daysUntilExpiry": 55,
"needsReconnect": false
},
{
"platform": "bluesky",
"displayName": "johnsmith.bsky.social",
"username": "johnsmith.bsky.social",
"connectedAt": "2025-01-02T10:00:00Z",
"expiresAt": null,
"daysUntilExpiry": null,
"needsReconnect": false
}
]
}Key Fields
| Field | Type | Description |
|---|---|---|
profileKey | string | Unique identifier for the profile |
profileName | string | Optional descriptive name |
createdAt | string | When the profile was created |
connectedPlatforms | array | Connected social media accounts |
Platform Connection Fields
| Field | Type | Description |
|---|---|---|
platform | string | Platform name (linkedin, bluesky) |
displayName | string | User's display name on the platform |
username | string | Platform username/handle |
connectedAt | string | When connection was made |
expiresAt | string|null | Token expiry (LinkedIn only) |
daysUntilExpiry | number|null | Days until expiry (LinkedIn only) |
needsReconnect | boolean | Whether reconnection is needed |
Profile Operations
- Connect OAuth - OAuth platform connections
- Connect with Credentials - Credential-based platform connections
- List Profiles - Get all profiles with connection status
- Delete Profile - Remove a profile and its connections
Profile Lifecycle
Creating a Profile
Profiles can be created explicitly or auto-created during the first platform connection:
// Explicit creation
const { profileKey } = await fetch("https://api.postcore.dev/profiles/create", {
method: "POST",
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
body: JSON.stringify({ profileName: "User: john@example.com" }),
}).then((r) => r.json());
// Auto-created during connection (omit profileKey)
const { profileKey } = await fetch(
"https://api.postcore.dev/profiles/connect",
{
method: "POST",
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
body: JSON.stringify({
platform: "bluesky",
credentials: {
handle: "user.bsky.social",
appPassword: "xxxx-xxxx-xxxx-xxxx",
},
}),
}
).then((r) => r.json());One Account Per Platform
Each profile can only have one account per platform. If a user wants to connect a different LinkedIn account, they must first disconnect the existing one or create a new profile.
Platform Differences
- Connection: OAuth redirect flow
- Expiry: 60 days
- Monitoring: Check
needsReconnectfield regularly - Rate Limit: 60 seconds between posts
Bluesky
- Connection: App password (POST request)
- Expiry: Never (unless user revokes)
- Monitoring:
needsReconnectalwaysfalse - Rate Limit: 1 second between posts