Update a social network
Update OAuth configuration for a specific social network platform. This endpoint allows you to update either the client_key, client_secret, or both values. 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.
Authorization: Only social networks belonging to your organization can be updated. Attempts to update social networks from other organizations will return a 403 Forbidden error.
/v1/social-networks/{id}Path Parameters
New 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
curl -X PATCH "https://api.outstand.so/v1/social-networks/string" \ -H "Content-Type: application/json" \ -d '{}'{
"success": true,
"data": {
"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": "Internal server error",
"message": "Database connection failed"
}