Beam Help
Get help now

How-to · Zoho CRM

How to retrieve social configuration in Zoho

Fetch social media configuration settings programmatically.

Retrieving social configuration in Zoho CRM is done through a single authenticated GET request to the /settings/social_config endpoint, which returns your account's mail and social settings in one call.


Why this matters


When building integrations or auditing your Zoho CRM setup, you may need to programmatically inspect how social channels are configured — for example, to verify that social media handles or email-linked social accounts are active. This is especially relevant if you are automating onboarding workflows or syncing social data across tools. As independent expert support (not official Zoho support), Beam Help walks you through exactly how to wire this up correctly.


Step-by-step


Step 1. Ensure your user has an active, valid Zoho connection before making any API call. The connection record must include a non-expired access_token. The system checks the token expiry with a 120-second buffer, refreshing automatically if the token is within that window of expiring — so you should always retrieve the connection object fresh rather than caching it locally. [6]


Step 2. Obtain a valid API client instance for Zoho CRM. Pass the relevant userid and specify "crm" as the apptype when calling the API factory function. If no connection record exists for that user, the factory returns None and you must prompt the user to reconnect before proceeding. [2]


Step 3. With a valid CRM API client in hand, call the getsocialconfig method. Under the hood this issues a GET request to the /settings/social_config endpoint on the Zoho CRM API. The method signature is straightforward — no additional parameters are required. [3]


# Example usage once you have a valid api instance
result = api.get_social_config()

Step 4. Handle the response. The endpoint is categorised under [MAIL & SOCIAL] settings, so the returned payload will contain your organisation's social configuration data. Parse the dictionary returned by the call and extract whichever fields your integration needs. [3]


Step 5. If the call returns a 401 or an access-token error, your token may have expired mid-request. The token refresh logic stores the new accesstoken and updated tokenexpiresat back into the zohoconnections table automatically, so retrying the request after a short delay should succeed. [6]


Common pitfalls


  • Wrong apptype selected. The getsocialconfig endpoint belongs to Zoho CRM, not Zoho Desk. If you accidentally initialise the API client with apptype="desk", the client will attempt Desk-specific routing (including org ID discovery) and the /settings/social_config path will not be reachable as expected. Always pass "crm" for this call. [2]

  • Missing or stale connection record. If getzohoconnection returns None — meaning no row exists in zohoconnections for the given userid — the API factory will also return None. Attempting to call getsocialconfig on a None object will raise an exception. Always guard against a None API instance before proceeding. [^6, ^2]

  • Data-centre (DC) mismatch. Zoho hosts data across multiple regions (e.g., .com, .eu, .in). The api_domain stored in the connection record must match the DC where the CRM org is provisioned. A mismatch will result in authentication or routing errors even with a valid token. [^1, ^2]

  • Token field naming across DCs. When fetching user or org information to bootstrap the connection, field names such as orgid, organizationid, and ZGID can vary by data centre. If your connection setup relies on these fields, ensure your parsing logic tries all known variants. [1]

What to check


  • Confirm the connection is active by verifying that zohoconnections contains a row for the target userid with a non-null accesstoken and a future tokenexpires_at value. [6]
  • Verify the app_type is "crm" in the API factory call — using "desk" will route to a different client class that does not expose the social config endpoint. [^2, ^3]
  • Inspect the raw response from GET /settings/social_config for any error keys before attempting to read social configuration fields, since an otherwise successful HTTP call can still return an application-level error payload. [3]

Sources cited

  1. [1] zoho_oauth.py
  2. [2] server.py: get_zoho_api
  3. [3] GET /settings/social_config
  4. [4] server.py: me
  5. [5] server.py: get_zoho_connection
  6. [6] server.py: chat_plan_stream
  7. [7] server.py: chat_stream
Retrieve Social Configuration | Beam Help