Update a social network
Update OAuth configuration for a specific social network platform.
Update OAuth configuration for a specific social network platform. This endpoint allows you to update client_key, client_secret, or the YouTube BYOK oauth_callback_url independently. Omit oauth_callback_url to preserve it or send null to restore the default callback. This is commonly used for:
- Credential Rotation: Regularly rotating secrets for security compliance
- OAuth App Migration: Moving from one OAuth application to another
- Correction: Fixing incorrect credentials stored during initial setup
- Regeneration: When credentials are regenerated in the platform's developer portal
Important: Updating credentials may require reconnecting social accounts if the OAuth application identifier (client_key) changes. If only the secret is rotated while keeping the same app, existing connections may continue to work depending on the platform.
/v1/social-networks/{id}Path Parameters
YouTube BYOK only. Exact customer-hosted HTTPS callback registered with Google. Omit to preserve the default; PATCH null clears it. Requires exactly one YouTube credential configuration.
length <= 2048New OAuth Client ID, API Key, or App ID to replace the existing value. Use this when you need to update credentials due to rotation, app recreation, or moving to a new OAuth application. Leave undefined if only the secret needs updating.
1 <= lengthNew OAuth Client Secret to replace the existing value. Use this when rotating secrets for security, or when migrating to new credentials. The old secret is immediately invalidated and encrypted. Leave undefined if only the client key needs updating.
1 <= lengthResponse Body
const body = JSON.stringify({})fetch("https://api.outstand.so/v1/social-networks/string", { method: "PATCH", headers: { "Content-Type": "application/json" }, body}){
"success": true,
"data": {
"oauth_callback_url": "https://auth.example.com/youtube/callback",
"id": "abc123",
"network": "x",
"client_key": "your_client_key_here",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
}{
"success": false,
"error": "Invalid payload",
"details": {
"network": {
"_errors": [
"Required"
]
}
}
}{
"success": false,
"error": "Invalid payload",
"details": {
"network": {
"_errors": [
"Required"
]
}
}
}{
"success": false,
"error": "Invalid payload",
"details": {
"network": {
"_errors": [
"Required"
]
}
}
}{
"success": false,
"error": "Invalid payload",
"details": {
"network": {
"_errors": [
"Required"
]
}
}
}{
"success": false,
"error": "Internal server error",
"message": "Database connection failed"
}