Kaizen #3 - Scopes in OAuth2.0 Authorization #API

Kaizen #3 - Scopes in OAuth2.0 Authorization #API

Hello Everyone!

Welcome to another week of Kaizen. We hope you find this series of posts useful. Please share your feedback in the comments section and keep the discussion going. 

In the last kaizen post, we discussed the OAuth2.0 protocol and Self Client. There are two types of clients in OAuth 2.0—self client and web-based applications. 

What you will learn from this post?

In this post, we are going to explore different facets of "Scopes in OAuth2.0 Authorization" in detail. Towards the end of this post, we will see various errors related to scopes, and how you can handle them. 

Role of scopes in OAuth2.0

To use the Zoho CRM APIs, you must authenticate the client(either self client or web-based application) to make API calls on your behalf with an access token. 

The access token, in return, must be obtained from a grant token (authorization code).

Zoho CRM APIs grant access to the CRM data, only if you provide a legitimate access token.

Based on the client-type, there are two different ways to generate grant token:

a. For web-based applications

Web-based applications are chosen when it requires user intervention while authorizing your application. Now, let us see how the OAuth2.0 protocol is implemented for web-based applications.

Step 1: The web application redirects the user to the OAuth server.
Step 2: The user sees the authorization prompt and approves the app's request as shown in the below image.


Step 3: The user is redirected back to the application with an authorization code in a query  string.


Step 4: The application exchanges the authorization code for an access token.

As you can see, this involves user intervention while authorizing your application. 

In the above explanation, in Step 2, the user will authorize the set of permissions for which the token has to be generated. 


b. For self client

In our last kaizen post, in Step 5a, you must enter the set of permissions for which the token has to be generated for a self client.



These sets of permissions you define, before you generate a token are called scopes

Scopes play a major role in OAuth2.0 Authentication. It is required for both self-client and web-based applications. 




A. What is a scope in Zoho CRM?

The word scope translates to range or extent. In OAuth2.0, scopes define the liberty of a self client/ web application on a particular resource(data in Zoho CRM). The scope controls three aspects:

  • The resource to which the client application gains access. Example: Users, Modules, Files, and so on.
  • The client application.
  • The different types of operations that the client application can perform on that particular resource. Example: ALL, READ, WRITE, CREATE, UPDATE, DELETE.
B. How do scopes work?

The access and refresh tokens are generated based on the scopes you provide. 

Based on the token, the system decides whether you have access to perform a certain operation on a particular resource. Thus, there is no room left for data theft, loss, or corruption. For example, with a token that is generated just to view records, you cannot perform the update record operation.

C. Scope Format

The format to define a scope is:
scope=service_name.scope_name.operation_type

The scope consists of three components:
  • service_name - Service name will always be ZohoCRM.
  • scope_name - In scope name, mention the specific resource(data in Zoho CRM) for which the permissions are being defined. It can be settings, modules, users, org, bulk, notification, or coql.
  • operation_type - In operation type, mention what types of operations can be performed on that resource. The following table defines the different operation types in scope:
Operation Type
HTTP Method
Description
READ
GET
The user can just read the data.
CREATE
POST
The user can create records.
WRITE
POST, PUT, DELETE
The user can create, update, and delete the records.
UPDATE
PUT
The user can update the existing records.
DELETE
DELETE
The user can delete the records
ALL
GET, POST, PUT, DELETE
The user can read, create, update, and delete the records.
CUSTOM
It depends on how it is defined in the API.
User-defined, for instance, permission to send emails to leads.

Note:
  • If you give operation type as WRITE in your scope, it is implicitly understood that you are granting permission to CREATE, UPDATE, and DELETE records.
  • Similarly, if you give operation type as ALL in your scope, it is implicitly understood that you are granting permission to READ, CREATE, UPDATE, and DELETE records.
D. Types of scopes

Based on the scope and methods, scopes are broadly differentiated into two types:
  • Sub-scopes
  • Group Scopes
a. Sub-scopes

Here the permission is defined for a specific resource. For instance, if you want to define permissions for leads and contacts modules, the scopes will be:
ZohoCRM.modules.leads.ALL
ZohoCRM.modules.contacts.ALL

Format
scope=service_name.scope_name.sub_scope_name.operation_type

The following table gives you the data about the scopes and different sub scopes. Along with each sub-scope, you can view which resource it is associated with:



Scopes
Sub scopes
settings- This scope usually provides access to metadata and the information on the set-up page of Zoho CRM. 
territories - Data about Territory Management.
custom_views - Data about custom_views created by users in all the modules.
related_lists - Data about related_lists.
modules - Metadata of all the modules.
variables - Data about CRM Variables.
tags - Data about tags.
tab_groups - Data about the tab groups in Zoho CRM.
fields - Data about fields in all the modules.
layouts - Data about layouts in all the modules.
macros - Data about macros operations.
custom_links - Data about the custom links.
custom_buttons - Data about the custom buttons.
roles - Data about roles in your organization.
profiles - Data about profiles in your organization.
organization - Data about your organization.

modules- This scope gives access to all the modules in Zoho CRM.
approvals - Data in the 'My Jobs' tab.
leads
accounts
contacts
deals
campaigns
tasks - Part of the 'Activities' module.
cases
events - Part of the 'Activities' module.
calls - Part of the 'Activities' module.
solutions
products
vendors
pricebooks
quotes
salesorders
purchaseorders
invoices
custom - Scopes cannot be configured for individual custom modules. Use this method for all custom modules.
dashboard - Data on the dashboard page.
notes - Data about notes in each record.
activities - Data about events, calls, and tasks.
Apart from the above two, other scopes are– 
  • users - Data about individual users in Zoho CRM. For more information, refer to Users API.
  • org - Data about your organization. For more information, refer to Organization API.
  • bulk - Permissions to perform bulk operations. For more information, refer to Bulk API.
  • notification - Permissions to send/receive instant notifications of actions performed on a module. For more information, refer to Notification API.
  • coql - Permissions to write your queries. For more information, refer to Query API.
b. Group Scopes

Format
scope=service_name.scope_name.operation_type

Imagine that you need to set permissions for all the modules. With sub-scopes, you must enter the following list of scopes—
ZohoCRM.modules.leads.ALL,ZohoCRM.modules.accounts.ALL,ZohoCRM.modules.contacts.ALL,ZohoCRM.modules.deals.ALL,ZohoCRM.modules.campaigns.ALL,ZohoCRM.modules.tasks.ALL,ZohoCRM.modules.cases.ALL,ZohoCRM.modules.events.ALL,ZohoCRM.modules.calls.ALL,ZohoCRM.modules.solutions,ZohoCRM.modules.products,ZohoCRM.modules.vendors,ZohoCRM.modules.pricebooks,ZohoCRM.modules.quotes,ZohoCRM.modules.salesorders,ZohoCRM.modules.purchaseorders,ZohoCRM.modules.invoices,ZohoCRM.modules.custom.

This is both cumbersome and exposing all these details in UI is not advisable. Thus, we came up with group scopes. With group scopes, you can define a set of permissions for a collective resource set. So, if you need to set permissions for modules, you can define the scope as:

ZohoCRM.modules.ALLThis gives the user access to perform all operations in all the modules in Zoho CRM.




E. Possible Errors

Error Code
Reason
Strategy to handle 
INVALID_SCOPE
The scope value is invalid.
Check the service name, scope name, and the sub-scope.
INVALID_OPERATION_TYPE
The operation type is invalid.
Ensure you have defined the operation type correctly. It must be either—READ, CREATE, WRITE, UPDATE, DELETE, ALL, or CUSTOM.
OAUTH_SCOPE_MISMATCH
The operation you performed does not have the required scope.
Check if the operation you are trying to perform is allowed in the scopes defined or not.

Note:

The INVALID_SCOPE and INVALID_OPERATION_SCOPE errors might be thrown while generating a grant token. The OAUTH_SCOPE_MISMATCH error might be thrown while you make an API call.

F. How to revoke access?

As mentioned earlier in this post, tokens are generated based on the scopes. 

There are two use-cases here. 

a. If you are a user who wants to revoke the access given to any web-application, then it has to be done via accounts web UI. 

To revoke the access:


Step 2: Choose 'Active Authtokens'.

Step 3: Click on 'Connected Apps'. Here you will be able to see all the active applications, click on the delete button to revoke access. 




b. If you are a client/developer, to revoke permissions for your self-client, you must revoke the access and refresh tokens.

You cannot revoke the access token as it expires after an hour of its generation.
To revoke the refresh token, make a POST request with the following URL:
"{{Accounts_URL}}/oauth/v2/token/revoke?token={refresh_token}"

Note that you must use domain-specific Zoho Accounts URL to revoke your refresh token. 

We will meet you next week with another useful topic. 

Cheers!

Previous 'Kaizen' - OAuth2.0 and Self Client #API
Next 'Kaizen' - Troubleshooting OAuth2.0




























    Access your files securely from anywhere


          All-in-one knowledge management and training platform for your employees and customers.







                                Zoho Developer Community




                                                      • Desk Community Learning Series


                                                      • Digest


                                                      • Functions


                                                      • Meetups


                                                      • Kbase


                                                      • Resources


                                                      • Glossary


                                                      • Desk Marketplace


                                                      • MVP Corner


                                                      • Word of the Day


                                                      • Ask the Experts



                                                                • Sticky Posts

                                                                • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                                  Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                                • Kaizen #226: Using ZRC in Client Script

                                                                  Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
                                                                • 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


                                                                Manage your brands on social media



                                                                      Zoho TeamInbox Resources



                                                                          Zoho CRM Plus Resources

                                                                            Zoho Books Resources


                                                                              Zoho Subscriptions Resources

                                                                                Zoho Projects Resources


                                                                                  Zoho Sprints Resources


                                                                                    Qntrl Resources


                                                                                      Zoho Creator Resources



                                                                                          Zoho CRM Resources

                                                                                          • CRM Community Learning Series

                                                                                            CRM Community Learning Series


                                                                                          • Kaizen

                                                                                            Kaizen

                                                                                          • Functions

                                                                                            Functions

                                                                                          • Meetups

                                                                                            Meetups

                                                                                          • Kbase

                                                                                            Kbase

                                                                                          • Resources

                                                                                            Resources

                                                                                          • Digest

                                                                                            Digest

                                                                                          • CRM Marketplace

                                                                                            CRM Marketplace

                                                                                          • MVP Corner

                                                                                            MVP Corner









                                                                                              Design. Discuss. Deliver.

                                                                                              Create visually engaging stories with Zoho Show.

                                                                                              Get Started Now


                                                                                                Zoho Show Resources

                                                                                                  Zoho Writer

                                                                                                  Get Started. Write Away!

                                                                                                  Writer is a powerful online word processor, designed for collaborative work.

                                                                                                    Zoho CRM コンテンツ





                                                                                                      Nederlandse Hulpbronnen


                                                                                                          ご検討中の方





                                                                                                                    • Recent Topics

                                                                                                                    • Time Zone is incorrect

                                                                                                                      Time zone is not working properly...I've checked it twice.  I'm eastern U.S. time it's currently 12:22 pm EST.  CRM shows 3:22 pm EST.
                                                                                                                    • Send a converted Contact or Deal back to Leads using the Restore Lead extension for Zoho CRM

                                                                                                                      Hello everyone, This comes up more than people expect: a Lead gets converted into a Contact, and sometimes a Deal along with it, because at the time it looked ready. Then the situation changes the opportunity turns out to be much further off than expected,
                                                                                                                    • Zoho CRM mobile updates: Reports module, record tags, dynamic formula field, and more

                                                                                                                      Hello everyone, We've made a few updates to the Zoho CRM mobile app to enhance your mobile CRM experience and efficiency. Here's a quick look at what's new: Reports module (iOS ) Record tags (iOS) Dynamic formula field (Android) WhatsApp business deep
                                                                                                                    • Side scroll bar missing from "new editor"

                                                                                                                      The "new editor" simply lacks a side scroll bar. Unable to navigate long notes without using the keyboard. Bad upgrade... (using web version)
                                                                                                                    • Zoho Desk MCP doesn't expose all functions

                                                                                                                      Hello, I'd like to be able to draft (rather than send) ticket replies using Claude Cowork. However, the Zoho Desk MCP doesn't currently offer that, despite it being available in the API (https://desk.zoho.com/DeskAPIDocument#Threads#Threads_DraftEmailReply).
                                                                                                                    • Zoho Community Digest - July 2026 | Part 1

                                                                                                                      Hello everyone! Keeping up with everything across the Zoho ecosystem is a lot, so we're bringing back the Zoho Community Digest, now weekly. Each week we round up the need-to-know announcements from the Zoho Community Forums, four editions a month, so
                                                                                                                    • Canva Integration

                                                                                                                      Hello! As many marketing departments are streamlining their teams, many have begun utilizing Canva for all design mockups and approvals prior to its integration into Marketing automation software. While Zoho Social has this integration already accomplished,
                                                                                                                    • Feature Suggestion for Zoho Social: Auto-reply to Comments or Keywords

                                                                                                                      Hi Zoho team, I'd like to suggest a very specific feature that would be extremely helpful for customer engagement: the ability to automatically send a reply to comments on posts — either all comments or those containing specific keywords. For example,
                                                                                                                    • Bring more clarity to your blueprints with color-coded transitions

                                                                                                                      As your hiring processes evolve, blueprints naturally become more detailed. When multiple transitions connect different stages, it can take extra effort to identify approvals, rejections, reviews, and other actions at a glance. With this enhancement,
                                                                                                                    • Zoho CRM gets a new email compose and lot more

                                                                                                                      Dear Customers,  [UPDATE October 21, 2021: We have started opening these features to some of the customers already. And, it will be available to all the customers before November 2nd Week, 2021. Sorry for the delay caused]  [UPDATE February 21, 2022:
                                                                                                                    • Create modules using natural language prompts

                                                                                                                      Hello all, We’ve introduced a new enhancement to Zia that allows you to create custom and team modules in Zoho CRM using plain language prompts. Why this enhancement? Creating a custom module traditionally involves multiple steps—choosing field types,
                                                                                                                    • Automatic Matching from Bank Statements / Feeds

                                                                                                                      Is it possible to have transactions from a feed or bank statement automatically match when certain criteria are met? My use case, which is pretty broadly applicable, is e-commerce transactions for merchant services accounts (clearing accounts). In these
                                                                                                                    • How emojis shape customer conversations

                                                                                                                      World Emoji Day is celebrated on July 17. Did you know that this date was inspired by the 📅 calendar emoji, which shows July 17 on most platforms? What started as a detail in the emoji's design has turned into a global celebration of these tiny emoticons.
                                                                                                                    • Custom Button Creation from Layout Editor in Zoho CRM

                                                                                                                      Hello All, Buttons in Zoho CRM act as triggers that perform a specific action when clicked. Zoho CRM includes a set of system buttons that help you carry out common actions with a single click. Beyond these, your organization can create custom buttons
                                                                                                                    • Displayed sample tracking for multi branch setup.

                                                                                                                      We have multiple branches and one of the biggest challenges for us to be able to track if a particular item is in display or not. I am shooting in the dark but I am wondering if there is a solution for the following : Each product used for display is
                                                                                                                    • Using IMAP configuration for shared email inboxes

                                                                                                                      Our customer service team utilizes shared email boxes to allow multiple people to view and handle incoming customer requests. For example, the customer sends an email to info@xxxx.com and multiple people can view it and handle the request. How can I configure
                                                                                                                    • Introducing Bulk Attachment Download from List View

                                                                                                                      We're excited to introduce an update to attachment management in Zoho Recruit that lets you download attachments associated with selected records directly from the List View page of any module. How do I download attachments in bulk? You can now select
                                                                                                                    • Advanced Group Settings: Customize and manage your email groups in Zoho Mail

                                                                                                                      Email groups in your organization often require more than basic configurations to function effectively. With Zoho Mail's Advanced Group Settings, administrators can configure and manage policies, notifications, and more with greater precision. This gives
                                                                                                                    • 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),
                                                                                                                    • Workdrive on Android - Gallery Photo Backups

                                                                                                                      Hello, Is there any way of backing up the photos on my android phone directly to a specific folder on Workdrive? Assuming i have the workdrive app installed on the phone in question. Emma
                                                                                                                    • Auto sync Photo storage

                                                                                                                      Hello I am new to Zoho Workdrive and was wondering if the is a way of automatically syncing photos on my Android phone to my workdrive as want to move away from Google? Thanks
                                                                                                                    • List of Mail Merge Templates via Deluge

                                                                                                                      Hello, Is it possible to get a list of the mail merge templates I've created in CRM within a custom function? I want to retrieve them and put them in a dropdown list but all I get is a scopes error! Can anyone see where I'm going wrong? Is this even possible?
                                                                                                                    • Feature Request Improve parent-child relationship visibility

                                                                                                                      Hi team, The Parent-Child ticket feature is great, but I've struggled to see the relationship between tickets when using ticket list views. It would be a great quality of life enhancement for users if child tickets were nested under parent tickets in
                                                                                                                    • Displaying only unread tickets in ticket view

                                                                                                                      Hello, I was wondering if someone might be able to help me with this one. We use filters to display our ticket list, typically using a saved filter which displays the tickets which are overdue or due today. What I'd really like is another filter that
                                                                                                                    • Is there provision to charge the attendees to join the webinar?

                                                                                                                      We want to host some webinar of public interest and want to charge them to participate in this. Does this feature in-build in the application? Offcourse, we will be having Razor pay account activated for these purpose.
                                                                                                                    • Desktop app doesn't support notecards created on Android

                                                                                                                      Hi, Does anybody have same problem? Some of last notecards created on Android app (v. 6.6) doesn't show in desktop app (v. 3.5.5). I see these note cards but whith they appear with exclamation mark in yellow triangle (see screenshot) and when I try to
                                                                                                                    • Don't send customer email when creating a ticket

                                                                                                                      Hi Is there an easy way to stop the system sending an email to the customer when we manually create ticket.
                                                                                                                    • Connecting a contact with the deal + Emails not showing up under Deals

                                                                                                                      Hello. I have two problems. Im not sure if the problem is due to level of my subscription - Im on Proffessional plan. 1. I have a JotForm connected with ZohoCRM which automatically creates a contact and a new deal based on form submission. That is done
                                                                                                                    • Accessing GDPR Data Source metadata for workflows and Zoho Analytics

                                                                                                                      Hi everyone, We have GDPR compliance enabled in Zoho CRM, which has added the Data Source section within the Data Privacy tab for Leads and Contacts. This section shows useful information such as: Original creation source, for example Zoho Forms Form
                                                                                                                    • Tiktok

                                                                                                                      When will Tiktok be added to the Zoho Social Platform?
                                                                                                                    • Zoho Mail iOS app update: Spam Controls & Sender Verification

                                                                                                                      Hello everyone! We are excited to introduce spam control enhancements in the Zoho Mail iOS app update. Let's dive into what's new. Spam Alerts in Mail Preview : Mail preview now shows warning alerts for emails identified as potentially harmful, helping
                                                                                                                    • Mise à jour de Zoho Books – France

                                                                                                                      Chers clients, Merci pour votre patience et votre soutien continu. Avec les évolutions réglementaires à venir en France nous introduisons de nouvelles fonctionnalités dans Zoho Books pour les clients français. Ces mises à jour ont été conçues pour répondre
                                                                                                                    • Admin Logging in as another User

                                                                                                                      How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Latest Update (27th April 2026): With the early
                                                                                                                    • Zoho Books API: Bulk update thousands of records using Node.js with OAuth refresh, retries and resume support

                                                                                                                      Hello everyone, During Zoho Books implementations, one common challenge is updating a large number of existing records. The current options are usually: Update records manually from the UI using Mass Update (with limited batch size). Update records one
                                                                                                                    • SalesIQ's Summer '26 Release: For The Moments That Matter

                                                                                                                      Every customer journey is made up of moments. The moment someone discovers your business. The moment they need help. The moment you decide to reach out. The moment a simple chat turns into something more. And the moments that continue long after the conversation
                                                                                                                    • CNIL - Suivi de Pixel

                                                                                                                      Bonjour à tous, À la suite de la nouvelle recommandation de la CNIL sur les pixels de suivi dans les e-mails, savez-vous si Zoho Campaigns permet : de conditionner le suivi des ouvertures au consentement de chaque contact ; de proposer un lien permettant
                                                                                                                    • Customer/Vendor Portal session duration - can it be extended?

                                                                                                                      Hi all, We'd like to know how long the login session lasts for the Customer/Vendor Portal in Zoho Books, and whether there's any way to extend it (either through settings or via support/API). Right now this is causing a pretty poor experience for our
                                                                                                                    • Accessible & Customizable User Governance in Zoho Projects!

                                                                                                                      As teams expand and collaborate with multiple external collaborators across projects, keeping control of user access to project data becomes a challenge. Mismanaged access can cause accidental or unauthorized edits, data leaks and lack of accountability.
                                                                                                                    • Bulk deleting Zoho CRM records using Deluge, COQL and CRM API

                                                                                                                      Hello everyone, During CRM implementations, data cleanup is a common task, especially after testing, migrations, imports, or integration development. The Zoho CRM UI allows deleting records in batches of 100, which is not practical when dealing with thousands
                                                                                                                    • CNIL - Suivi de Pixel

                                                                                                                      Bonjour à tous, À la suite de la nouvelle recommandation de la CNIL sur les pixels de suivi dans les e-mails, savez-vous si Zoho Campaigns permet : de conditionner le suivi des ouvertures au consentement de chaque contact ; de proposer un lien permettant
                                                                                                                    • Next Page