EstateHub

Administrator Social Login / OAuth Integration API

This page documents administrator configuration. Customer sign-in availability is described in the product integration guide.

Base URL: http://localhost:8000/api/v1
Prefix: /admins/platform-settings/integrations
Auth: Administrator JWT required
Headers: Content-Type: application/json

1. Get OAuth Configuration

Retrieve the saved integration state and sanitized configuration.

GET/admins/platform-settings/integrations/oauth/

Auth: Required

Headers

HTTP
Authorization: Bearer {{admin_access_token}}
Content-Type: application/json

Success Example

JSON
{
  "success": true,
  "message": "Integration retrieved successfully.",
  "data": {
    "integration": {
      "type": "oauth",
      "is_enabled": true,
      "configured": true,
      "config": {
        "google_enabled": true,
        "google_client_id": "replace-with-client-id",
        "facebook_enabled": false,
        "apple_enabled": false,
        "has_google_client_secret": true,
        "has_facebook_app_secret": false,
        "has_apple_private_key": false
      },
      "updated_at": "2026-11-24T10:00:00Z"
    }
  }
}

Notes

Sensitive values are returned as has_* flags. configured means encrypted configuration exists; it does not verify provider credentials. A missing integration record is created disabled.

Applicable errors: 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format.

Unauthorized - HTTP 401

JSON
{
  "success": false,
  "message": "Authentication credentials were not provided.",
  "errors": {}
}

Forbidden - HTTP 403

JSON
{
  "success": false,
  "message": "You do not have permission to perform this action.",
  "errors": {}
}

2. Update OAuth Configuration

Save provider configuration and optionally enable or disable the integration.

PATCH/admins/platform-settings/integrations/oauth/

Auth: Required

Headers

HTTP
Authorization: Bearer {{admin_access_token}}
Content-Type: application/json

Request Body

FieldTypeRequirement
is_enabledbooleanOptional; preserves the saved state when omitted.
configobjectOptional; merges the submitted fields with saved configuration.

Google

JSON
{
  "is_enabled": true,
  "config": {
    "google_enabled": true,
    "google_client_id": "replace-with-client-id",
    "google_client_secret": "replace-with-client-secret",
    "facebook_enabled": false,
    "apple_enabled": false
  }
}

Facebook

JSON
{
  "is_enabled": true,
  "config": {
    "google_enabled": false,
    "facebook_enabled": true,
    "facebook_app_id": "replace-with-app-id",
    "facebook_app_secret": "replace-with-app-secret",
    "facebook_api_version": "v23.0",
    "apple_enabled": false
  }
}

Apple

JSON
{
  "is_enabled": true,
  "config": {
    "google_enabled": false,
    "facebook_enabled": false,
    "apple_enabled": true,
    "apple_client_id": "replace-with-client-id",
    "apple_team_id": "replace-with-team-id",
    "apple_key_id": "replace-with-key-id",
    "apple_private_key": "-----BEGIN PRIVATE KEY-----\nreplace-with-private-key\n-----END PRIVATE KEY-----"
  }
}

Success Example

JSON
{
  "success": true,
  "message": "Integration updated successfully.",
  "data": {
    "integration": {
      "type": "oauth",
      "is_enabled": true,
      "configured": true,
      "config": {
        "google_enabled": true,
        "google_client_id": "replace-with-client-id",
        "facebook_enabled": false,
        "apple_enabled": false,
        "has_google_client_secret": true,
        "has_facebook_app_secret": false,
        "has_apple_private_key": false
      },
      "updated_at": "2026-11-24T10:00:00Z"
    }
  }
}

Notes

Both is_enabled and config are optional. PATCH merges with saved configuration; omit unchanged secrets to retain them. Required values must exist in the merged configuration when enabled. Saving does not verify provider connectivity. Disable with { "is_enabled": false }; re-enable with { "is_enabled": true } when configuration is complete.

Enable at least one of google_enabled, facebook_enabled, apple_enabled and supply its credentials. Multiple OAuth providers may be enabled together. facebook_api_version must match v<number>.<number>. Encode PEM newlines as \n in raw JSON.

Required fields when enabled

ProviderRequired fields
googlegoogle_client_id, google_client_secret
facebookfacebook_app_id, facebook_app_secret
appleapple_client_id, apple_team_id, apple_key_id, apple_private_key

Configuration fields

FieldTypeDetails
google_enabledbooleanOptional in a partial update
google_client_idstringMaximum length: 255; blank allowed
google_client_secretstringMaximum length: 255; blank allowed; write-only
facebook_enabledbooleanOptional in a partial update
facebook_app_idstringMaximum length: 255; blank allowed
facebook_app_secretstringMaximum length: 255; blank allowed; write-only
facebook_api_versionRegexblank allowed; Maximum length: 20
apple_enabledbooleanOptional in a partial update
apple_client_idstringMaximum length: 255; blank allowed
apple_team_idstringMaximum length: 255; blank allowed
apple_key_idstringMaximum length: 255; blank allowed
apple_private_keystringblank allowed; write-only

Disable without deleting configuration

JSON
{
  "is_enabled": false
}

Re-enable with complete saved configuration

JSON
{
  "is_enabled": true
}

No OAuth provider enabled - HTTP 400

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "config": "Enable at least one OAuth provider."
  }
}

Applicable errors: 400 invalid/missing configuration or malformed JSON; 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format; 415 unsupported content type.

Unauthorized - HTTP 401

JSON
{
  "success": false,
  "message": "Authentication credentials were not provided.",
  "errors": {}
}

Forbidden - HTTP 403

JSON
{
  "success": false,
  "message": "You do not have permission to perform this action.",
  "errors": {}
}

Integrations Overview | Product Integration Guide