Skip to content

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.

PATCH/v1/social-networks/{id}

Path Parameters

idstring

Request Body

application/json

client_key?string

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.

Length1 <= length

client_secret?string

New 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.

Length1 <= length

Response Body

200application/json

400application/json

403application/json

404application/json

500application/json

JavaScript

Go

Java

C#

cURL

TypeScript

Python

Swift

const body = JSON.stringify({})

fetch(" {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json"
  },
  body
})

200400403404500

{
  "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"
}

Get details of a social network GET\ \ Previous Page Disconnect a social network DELETE\ \ Next Page