Kaizen #200 - Answering Your Questions | Authentication using Zoho CRM Python SDK

Kaizen #200 - Answering Your Questions | Authentication using Zoho CRM Python SDK



We’re incredibly excited to bring you the 200th post in our Kaizen series!

Idea
This journey has been as much about listening as it has been about sharing. And today, we’re making both count. Over the past few weeks, we’ve collected your feedback through the Kaizen feedback form added in our earlier posts. Thank you for the time and thought you’ve put into it.

Starting today, we’ll be actively addressing your most requested topics. 

Overview – OAuth 2.0 and Zoho CRM SDKs

In this Kaizen, we’ll walk you through how OAuth 2.0 authentication is handled using the Zoho CRM Python SDK, and how the SDK simplifies token refresh, storage, and management for multiple users and organizations across multiple data centers.

Introduction:


OAuth2.0 Recap:



Token Management using Zoho CRM SDKs:


Sample Project Overview

We’ve used a fully working sample project to demonstrate the OAuth flow in action.

Frontend

A static interface built using HTML, CSS, and JavaScript.
Files include:
  • index.html – login and data input page
  • script.js – client-side login and record handling
  • redirect.html – used to capture the grant token from Zoho

Backend

A Python server using Zoho CRM SDK to:
  • Authenticate users using OAuth 2.0
  • Store and manage tokens
  • Fetch and manipulate CRM records

Note:

Before running the project, you’ll need to register your client in the Zoho API Console. Once registered, use the generated Client ID and Client Secret in your server code.
If you're planning to support users across multiple Zoho Data Centers (DCs):
  • Be sure to enable Multi-DC for your client.
  • Use the same client credentials (Client ID and Secret) for all the DCs during authentication.

Implementation Demo:

How the SDK Maps Tokens to Users

One of the key challenges in multi-user apps is ensuring that each user's tokens are stored and retrieved correctly. The Zoho CRM Python SDK handles this automatically.
As part of the OAuth flow, the SDK retrieves the user's email and organization info in the background using the scopes ZohoCRM.users.READ and ZohoCRM.org.READ. It then uses this unique user–org combination to:
  • Store access and refresh tokens separately for each user
  • Automatically update tokens when a user logs in again
  • Ensure that all API calls are authorized with the correct tokens
If you're implementing Login with Zoho using the standard OAuth redirect flow, all of this is handled internally by the SDK using the user and org information retrieved during login. There’s no need to manually pass a UserSignature in the token object.
 
If you're not implementing Login with Zoho, or if you’d prefer to explicitly associate a token with a known user, you can pass a UserSignature object during initialization:
  1. from zohocrmsdk.src.com.zoho.api.authenticator import UserSignature

    user = UserSignature(email)
    token = OAuthToken(..., user_signature=user)
    Initializer.initialize(..., user=user)
This ensures the SDK can correctly identify the token's owner and separate tokens for different users or orgs in a multi-user application.

Multi-User & Multi-DC Token Management


Authentication can often be one of the trickiest parts of any integration, especially when you're dealing with multiple users, environments, and token refresh cycles. With the Zoho CRM SDKs, much of that complexity is handled for you, from generating and persisting tokens, to refreshing them silently when they expire, and managing user-org mappings behind the scenes.

We hope this Kaizen gave you a clearer picture of how to use our SDKs confidently in your apps. Try out the project, play around, and see how it all works in real time. 

If you have any queries, let us know the comments below, or send an email to support@zohocrm.com. We'd love to hear from you.


    • Sticky Posts

    • Kaizen #222 - Client Script Support for Notes Related List

      Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
    • Kaizen #217 - Actions APIs : Tasks

      Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
    • Kaizen #216 - Actions APIs : Email Notifications

      Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
    • Kaizen #152 - Client Script Support for the new Canvas Record Forms

      Hello everyone! Have you ever wanted to trigger actions on click of a canvas button, icon, or text mandatory forms in Create/Edit and Clone Pages? Have you ever wanted to control how elements behave on the new Canvas Record Forms? This can be achieved
    • Kaizen #142: How to Navigate to Another Page in Zoho CRM using Client Script

      Hello everyone! Welcome back to another exciting Kaizen post. In this post, let us see how you can you navigate to different Pages using Client Script. In this Kaizen post, Need to Navigate to different Pages Client Script ZDKs related to navigation A.
      • Recent Topics

      • Best way to schedule bill payments to vendors

        I've integrated Forte so that I can convert POs to bills and make payments to my vendors all through Books. Is there a way to schedule the bill payments as some of my vendors are net 30, net 60 and even net 90 days. If I can't get this to work, I'll have
      • Seamless Round-Trip Navigation for Related Blocks (Detail View)

        As highlighted previously in this post (and here, here, here, and here), we still lack a fundamental capability for seamless navigation in Related Blocks. The popup that appears when adding a related record doesn't exist for viewing/editing existing records,
      • Service and Parts Line Item Limitations

        Hi FSM Team, We work with clients who deliver large-scale field service projects. In many cases, a single work order can contain 200+ service and parts line items. Currently, Zoho FSM limits work orders to 30 service and parts line items. While this works
      • Social Profile Logo Format

        Hello, I'm using Zoho Sites and am attempting to add a couple of social media accounts to my profile that aren't included in the default platforms that are available. What format is the logo required to be in? I have tried .png and .jpg with no success.
      • How to create Sepa Direct Debit XML file: solution and code

        Even though Books provides a payment integration for Stripe and Gocardless (in Europe) there are customers that want to use the Sepa services of their own bank. Mainly because Stripe and Gocardless are quite expensive. In that case they would need a Sepa
      • Traditional Spreadsheet vs Zoho Tables

        Hello everyone, This article explains the differences between Spreadsheet applications and no-code databases, such as Zoho Tables. While both tools belong to the "grid" family, the core difference lies in their purpose. A spreadsheet (such as Zoho Sheet,
      • Customer ticket creation via Microsoft Teams

        Hi all, I'm looking to see if someone could point me in the right direction. I'd love to make it so my customers/ end users can make tickets, see responses and respond within microsoft teams. As Admin and an Agent i've installed the zoho assist app within
      • RFQ MODEL

        A Request for quotation model is used for Purchase Inquiries to multiple vendors. The Item is Created and then selected to send it to various vendors , once the Prices are received , a comparative chart is made for the user. this will help Zoho books
      • Delegate Access - Mobile iOS/iPad

        We’re over the moon that delegate access is now available in Zoho Mail as we were nearly ready to switch platforms because of it! Is there a timeline on when delegate mailboxes will be accessible from the iOS and iPad OS applications? Thanks, Jake
      • Request For Quotation (RFQ) module

        Hello, Do you have any plans to implement a RFQ module in to ZOHO Inventory? I would like to chose items that I require a price for, select a number of different suppliers to e-mail and have them submit there pricing online. I would then like to see a
      • Unable to change Lookup field from Multi Select to Single Select

        I am trying to change a Lookup field in my Zoho Creator form from Multi Select to Single Select, but I am unable to find any option to do this.
      • Support for Developing Zoho Recruit Extensions via Zoho Sigma

        Hi, I’m interested in building an extension for Zoho Recruit using Zoho Sigma. However, when I navigate to Sigma and attempt to create a new extension (via the "New Extension" option), Zoho Recruit does not appear as a listed service—only options like
      • Can I re-send the Customer Satisfaction Survey after a ticket closure?

        Hello, Some customers does not answer the survey right after closure, is it possible to re-send after a few days or weeks? Best Regards!
      • FOLDER DISAPPEARED

        Hello Zoho Community. I recently found a problem with no explanation: a folder in Zoho Analytics just disappeared, but the tables and SQL sentences still existed, the folder was not deleted. The solution for me in this case was to create a new folder,
      • How to create estimates/Invoices with sub-totals

        Every other accounting package can create estimates and invoices with Sub-totals. How can I do that in ZohoBooks?
      • Zoho Books Sandbox environment

        Hello. Is there a free sandbox environment for the developers using Zoho Books API? I am working on the Zoho Books add-on and currently not ready to buy a premium service - maybe later when my add-on will start to bring money. Right now I just need a
      • Deluge scripts

        Why is there not a search function to make it easier to find the script of interest when modifications are required.
      • Social media simplified with Zoho Social: Why should brands have a Threads profile?

        Just over a year ago, Instagram launched Threads, the all new social media app primarily focusing on sharing text online. It was welcomed by people worldwide with more than 10 million users in just seven hours, and it currently has over 175 million active
      • Auto tracking URL generation based on Carrier

        Hi, While creating a shipment order for a package in Zoho Books, I have a requirement that for example, if the carrier is Delhivery and tracking number is 1234, then can automatically the tracking link/URL be generated as www.delhivery.com/1234. Similary,
      • New Beginnings with Zoho Desk mobile app best practices: Part 3

        In focus: Scaling consistency, intelligence, and customization In our third installment, we'd like to share tips to help you elevate your customer experience as you handle support operations seamlessly on mobile. Let's reconnect with Omniserve, the field
      • Develop and publish a Zoho Recruit extension on the marketplace

        Hi, I'd like to develop a new extension for Zoho Recruit. I've started to use Zoho Developers creating a Zoho CRM extension. But when I try to create a new extension here https://sigma.zoho.com/workspace/testtesttestest/apps/new I d'ont see the option of Zoho Recruit (only CRM, Desk, Projects...). I do see extensions for Zoho Recruit in the marketplace. How would I go about to create one if the option is not available in sigma ? Cheers, Rémi.
      • Highlights of 2025: Milestones and moments

        Hey everyone! As we step into 2026, it’s a great time to look back at everything 2025 brought to Zoho Social. This year was big, packed with powerful new features, smart enhancements, exciting events, and a major milestone: a whole decade of Zoho Social.
      • Override Auto Number field?

        We are preparing to migrate from Salesforce. In Salesforce, we auto-generate a unique number on our Opportunities (Potentials). If the Opportunity results in a contract, we use that unique number as the Contract number. There are some situations where
      • Introducing the sandbox environment in Zoho Sign

        Hey there! Customer and partners across the globe have been requesting a testing environment—also called a sandbox—for quite some time. Sandboxes help you try out document workflows before using them in your production setup. This new year, we are excited
      • Zoho CRM for Everyone's NextGen UI Gets an Upgrade

        Hello Everyone We've made improvements to Zoho CRM for Everyone's Nextgen UI. These changes are the result of valuable feedback from you where we’ve focused on improving usability, providing wider screen space, and making navigation smoother so everything
      • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

        Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
      • Zoho Desk - Zoho FSM Integration issue on Mobile and iPad

        Hello Team, I am trying to create a Work Order (WO) using the Zoho FSM integration (Add-on Service) that is integrated with Zoho Desk. The issue is that the integration is not working on mobile devices and iPads. While I am able to create the WO, Request,
      • Can I share the drive with another Windows user?

        We use the WorkDrive Sync application on a server with several remote desktop users. Our question is: Can the drive created by WorkDrive Sync be shared from one of these remote users with the other users so they can access the files, or do we need to
      • Syncing Bills in Zoho Books to Zoho CRM

        Is there any way to sync the Bills in Zoho Books in Zoho CRM
      • Zoho Books Items Categorisation/Grouping/Folder

        Is there a way to do items categorisation? a folder structure? Product Type A - Option 1/2/3 Product Type B - Option 1/2/3 Current problem : I have more than 50 items on the list, its hard for team to navigate.
      • Auto CheckOut Based On Shift.

        This Deluge script runs on a scheduled basis to automatically set the 'Actual_Check_Out' time for employees who haven't manually checked out. If the current time is past their scheduled 'Shift_End_Time', the script updates the check-out time to match
      • Formula working in MS Excel , is not working in Zoho Sheets, Filter fuction which is working in MS sheets per the attached workbook / Daily update.

        Filter function , which is working in MS Excel is not working in Zoho sheets. Please help on function of filter of particular class sheets and extract students name who has more than 3.5 hours of study hours on particular day depending on date in D7 cell.
      • CRM gets location smart with the all new Map View: visualize records, locate records within any radius, and more

        Hello all, We've introduced a new way to work with location data in Zoho CRM: the Map View. Instead of scrolling through endless lists, your records now appear as pins on a map. Built on top of the all-new address field and powered by Mappls (MapMyIndia),
      • Problem using Zoho Desk API

        Goodmorning, I am trying to use the Zoho Desk API to create a dashboard in Grafana, but I am having a problem. Following the instructions in the API documentation, I created the API Console application (server-based application). Then I created the string
      • ERROR: Product type cannot be changed for Items having transactions.

        I have mistakenly added a product type as goods for an item that was a digital service. Now when HSN/SAC became mandatory, this brought my attention to this error I did. So I tried changing the product type but it displayed this error message Product
      • Automate pushing Zoho CRM backups into Zoho WorkDrive

        Through our Zoho One subscription we have both Zoho CRM and Zoho WorkDrive. We have regular backups setup in Zoho CRM. Once the backup is created, we are notified. Since we want to keep these backups for more than 7 days, we manually download them. They
      • Boost your CRM accuracy with smart Data Enrichment

        Hello all! In this post let's look at data enrichment from a holistic perspective to gain more clarity on how you can use it. So, here's a quick recap of what data enrichment is and how you set it up it to enhance your existing module data! What is data
      • Is Zoho One Desktop more secure than Zoho One Web SaaS?

        Is Zoho One Desktop more secure than using Zoho One in browser? Inherently, it seems desktop would be unless you don't do things like share your pw or leave pc on. I am concerned about data being on the cloud or someone else's server and database.
      • Is it possible to set a region lookup table so that my deal country can lookup this lookup table

        Hi there, I would like to be able to add a data lookup table with the following fields: Country, Region. And then in my deal report, i can then lookup this table to fish out the region in my report. This will be important for my sales process to categorise
      • Test Emails Show Sent "via zcsend.net" in My Gmail Account

        I noticed the following info... However, a few email service providers such as Outlook and Gmail will display that the email was sent by zcsend.net (Zoho campaigns’ server) on your behalf instead of just your from email address.  In order to prevent this, you can go for either of these options: Do not select the check box meant for DomainKey Signature which is listed under Unverified sender domains. Include our mail servers by advanced authentication method such as SPF/ Sender ID and DomainKey/ DKIM.
      • Next Page