User Profile Integration Guide
This guide explains how to integrate Upload-Post directly into your own platform. This allows your users to connect their social media accounts securely through Upload-Post, enabling your platform to manage their profiles and posts via the API on their behalf.
Integration Flow Overview
The core idea is to create a unique profile within Upload-Post for each user on your platform who wants to connect their social accounts. You then generate a special, secure URL that the user visits to link their accounts. Once linked, your platform can interact with the Upload-Post API using the user's unique identifier.
Step-by-Step Integration
Step 1: Create a User Profile
For each user on your platform, you need to create a corresponding profile in Upload-Post. This is done by making a POST
request to the /api/uploadposts/users
endpoint.
- Requirement: You must provide a unique
username
in the request body. Thisusername
should be a stable identifier that links the Upload-Post profile back to the user on your platform (e.g., your internal user ID). - Authentication: Remember to include your
Authorization: ApiKey YOUR_API_KEY
header. - Result: The API will respond with details of the created profile, confirming the
username
.
➡️ See details: Create User Profile API Reference
Step 2: Generate the Secure JWT URL
Once the profile exists, you need to generate a secure URL that your user will use to connect their social media accounts. Make a POST
request to the /api/uploadposts/users/generate-jwt
endpoint.
- Requirement: Provide the same unique
username
(from Step 1) in the request body. - Authentication: Include your
Authorization: ApiKey YOUR_API_KEY
header. - Result: The API will return a JSON object containing an
access_url
. This URL contains a short-lived, secure token (JWT).
➡️ See details: Generate JWT URL API Reference
Step 3: User Connects Accounts
Redirect your user to the access_url
obtained in Step 2. This URL will open the Upload-Post interface, guiding the user through the process of securely connecting their desired social media accounts (like Instagram, TikTok, Facebook, etc.) to their profile. Upload-Post handles the OAuth flows and token storage securely.
Step 4: Manage User Content via API
After the user successfully connects their accounts in Step 3, your platform can now use other Upload-Post API endpoints to manage content on their behalf.
- When making calls to endpoints like Upload Photo or Upload Video, you will typically include the user's unique
username
(the one you used in Step 1 and 2) in the request parameters to specify which profile's connected accounts should be used. - You can also retrieve the list of profiles and their connected accounts using the
GET /api/uploadposts/users
endpoint.
➡️ See details: Get User Profiles API Reference
Authentication
All API requests related to user profile management (/api/uploadposts/users
and /api/uploadposts/users/generate-jwt
) require authentication using your API Key. Include it in the Authorization
header for every request:
Authorization: ApiKey YOUR_API_KEY
Replace YOUR_API_KEY
with the actual API key provided to you.
(Note: The /api/uploadposts/users/validate-jwt
endpoint uses Bearer token authentication, as detailed in its specific documentation).
Next Steps
With the user profiles created and accounts linked, explore the other API references to start managing content: