Kaizen #116 - Client Types in Zoho API Console

Kaizen #116 - Client Types in Zoho API Console

Hello everyone!
Welcome back to another post in the Kaizen series!

This week, we will discuss different client types available in Zoho API Console, and when to use each.

When you register an app in Zoho API Console, you typically choose a client type based on how your application interacts with Zoho services.
Let us discuss the available client types and how authorization is handled for each.

Available client types

  1. Server-based
  2. Client-based
  3. Self client
  4. Non-browser-based
  5. Mobile-based

1. Server-based

If you have a web-based application that runs on a dedicated HTTP server and interacts with Zoho services by calling Zoho APIs via that server, you must register your app with this client type.
This client type is for applications that redirect the users to another URL on a web browser to authorize themselves, where they give consent to your application to use their data.
In other words, you must use this client type when you have a front-end web UI and require user intervention before your app can access user data via the dedicated server.

Consider that you are developing a web-based custom application. Users authorize that app via browser to allow their Zoho CRM data to be accessed and used by that application.
During the registration process in Zoho API Console, you would choose the "Web-based" client type.
OAuth 2.0 would be used for user authentication, allowing your app to securely access and interact with Zoho CRM data on behalf of the users.

Here is a gist of what happens:
  1. Users visit your website where you have the Login with Zoho button.
  2. When a user clicks it, that user will be redirected to accounts.zoho.com with the details of your app such as client ID, scope, redirect uri, access type as the URL parameters.
  3. Your app must make an API call to Zoho Accounts with the client ID, scope, redirect uri, and access type. Users are shown the data that your application wants to use.
  4. When users give their consent, Zoho redirects them back to your app.This will be the "Redirect URL" you give while registering your app.
  5. The redirect URL will have the authorization code(grant token) as one of the parameters, along with the location(user's domain).
  6. Your app must then make API calls from your web server to Zoho Accounts to generate access and refresh tokens with the generated grant token.
  7. You must store these tokens in your DB to access that user's data in Zoho CRM. While making API calls, you must send this access token in the header.
  8. Your app must also have the logic to regenerate access tokens from refresh tokens when the access token expires.
Note that your app must take care of storing user's details like email, organization ID, and tokens.

The following image shows the protocol flow.


You can use any of our server-side SDKs to simplify this process.
When you use our SDK, all you have to do is, generate the grant token and initialize the SDK with the client details and this token. The SDK takes care of access token generation, refreshing it, and token storage.


For more details, you can refer to the Accounts guide and CRM help doc.

2. Client-based applications

This client type is for applications that do not have a server and run exclusively on a web browser.
This is also called the Implicit flow as your app makes API calls to Zoho only when users are using your app.
This type of application loads data dynamically on the webpage, and accesses Zoho CRM data by making API calls via Javascript.

Consider the same example where there is a Login with Zoho button on your webpage.
Here is a gist of what happens when a user clicks it.
  1. Your app redirects the user to Zoho Accounts.
  2. Your app makes the authorization request with the client ID, redirect uri, scope, and response type as token.
  3. The user is shown the data that your webpage would use.
  4. When the user gives consent, Zoho Accounts sends the access token to the redirect uri as a parameter, along with the expiry time and the location of user's data in Zoho's accounts server.
  5. You can include the "email" in your scope parameter in the access token request to get user's information. The response will have a parameter called id_token that will be in the header.payload.signature format. You need to decrypt the payload section of the parameter using the base-64 decryption algorithm to get user information.
  6. Your app must then make API calls to Zoho with this access token to fetch data.
  7. When the access token expires, your app must take care of regeneration and storage.


As the API calls are made from your domain to a different domain(zohoapis.com), for security reasons, the browser will throw the CORS error. So, your domain will be registered while registering your app, and Zoho will know to allow the API calls made from that domain.

As the tokens are available on the browser itself, we recommend handling them with care.
When you use our client-side JS SDK, it automatically generates a new access token upon expiry.

3. Self Client Applications

When your application does not have a redirect URL or a UI, but performs only a backend job, and does not need user intervention, then you must choose this client type.

A self client is often used when the application and Zoho services are operated by the same entity, and you want to enable secure communication between them. For example, you have an internal reporting tool and integrate it with Zoho Analytics. In this case, both the tool and Zoho Analytics are operated by the same entity.
Similarly, consider that you have a legacy product management system and want to perform data sync between Zoho CRM and the system, then you must use the self client.

Here is a gist of what happens.
  1. You register your app as self client in Zoho API Console.
  2. You will get the client details such as ID and secret.
  3. You provide the scopes required for your app to access CRM data.
  4. You will receive the grant token.
  5. Your app must then make API calls to Zoho Accounts to generate access and refresh tokens.
  6. Your app can then use this access token to make API calls to Zoho CRM and use data.
You can refer to our older Kaizen post on this topic for more details.
Note that self client apps can also use any of our server-side SDKs. As already said, the SDK takes care of access and refresh token generation, refreshing the access token, and token storage.

4. Non-browser applications

This client type is for devices that do not have a user agent such a web browser. A TV, for instance.
Let us consider an example involving a smart TV application that integrates with Zoho ShowTime. In this scenario, the smart TV application acts as a non-browser client.
Here is how authentication is handled:
  1. You must register your smart TV app in Zoho API Console with the type "Non-browser application".
  2. Users install a dedicated Zoho ShowTime application on their smart TVs.
  3. When users launch the Zoho ShowTime application on their smart TV, they are prompted to authenticate with their Zoho ShowTime account.
  4. When they successfully authenticate, Zoho Accounts sends the grant token to your app, along with the user-code, device-code and verification URL,The user must go to this verification URL on a browser and enter the user-code to grant permission to the app.
  5. Meanwhile, your app must poll the accounts server using the grant token to check if the token has been received.
  6. When the user enters the user code, Zoho Accounts sends the access token to your app.
  7. Your app can then use the access token to make API calls to Zoho. Your app must take care of token storage and renewals.

Here is the protocol flow. For more details, refer to this doc.


5. Mobile-based applications

You must use this client type when you have developed an app exclusively for mobile devices. The protocol flow is similar to server-based application where a browser session is required for the users to authenticate.



Similar to server-side apps, mobile apps also need to handle redirection, token generation and storage.
If you use any of our Mobile SDKs, the SDK itself handles token generation and storage.

We hope you found this post useful. Let us know your thoughts in the Comment section or write to us at support@zohocrm.com.


Cheers!


      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

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

                              Zoho CRM コンテンツ




                                ご検討中の方

                                  • Recent Topics

                                  • Anone know how to add email body text in Button Properties ?

                                    When adding a button there is an option use a "Link to Email Address" which triggers an email addresses to the To: email and with the Subject as per the Subject field. I want to add some text in the body of the email, such as My contact details are: Name:
                                  • remove email address from an old account

                                    I have deleted the domain and/or closed the organization in my Zoho account, but the email address (e.g., info@brassprime.com , orders@brassprime.com , returns@Business Companion ) is still associated with the previous organization. Now I cannot
                                  • Multi-language Support Expanded!

                                    We are delighted to share some exciting news following our previous announcement about multi-language support! Our multi-language capabilities have been significantly enhanced to better serve our growing and diverse user base. Below is the complete list
                                  • Dynamic Dashboard for CRM Flyout/Widget

                                    Hello, Apologies if this has been answered before—it's possible I'm just not searching the community with the right terms. I'm trying to create a dashboard in Zoho Analytics that pulls together reports from several datasets (e.g., CRM Deals, Books Invoices,
                                  • LinkedIn Inbox Auto-Responder

                                    How do I set up an auto-responder message from my LinkedIn's company inbox?
                                  • Zoho Projects for Departments

                                    We’re currently using Zoho Projects across multiple departments in our company (e.g., Marketing and Project Implementation), and we’re trying to figure out the best way to keep each department's projects and templates completely separate. Here’s what
                                  • Getting daily summary report from SalesIQ

                                    Why am I suddenly getting a daily summary report from SalesIQ when I'm not even using it nor signed up to it knowingly?
                                  • Changes in the new UI of the record details page

                                    Hello everyone,   We released a new UI for the record details page early last month (March 11th, 2020) and are happy with the overwhelming response. A big thanks to everyone for your valuable feedback and suggestions.   Based on those suggestions, we have introduced the following changes: The width of the Notes section has been increased. The width of the Description column in the Related List has been increased. Introduced appropriate colors to represent the closed won or closed lost deals. The
                                  • Approval Process not triggering for specific user

                                    Hi there! I have a simple approval process set up and have confirmed that it is working for at least one of my team (I'm super admin). So, the process is set up correctly. However, for a specific user in my organization, the process doesn't trigger when
                                  • Turn Ticket into Zoho CRM Lead

                                    Is there a way to set up Zoho Desk -> Zoho CRM integration in a way that would allow out support agents to turn a Help Desk ticket into Zoho CRM Lead?
                                  • Import a list of contacts from csv and delete them

                                    I have a list of email addresses which I want to delete from all lists. The contacts are distributed over multiple lists. So I cannot delete whole lists because there are other contacts too? Is there a way to import the list and delete the contacts in
                                  • AUTO ASIGNACION DE TICKETS

                                    Cuando uno se asigna un ticket y lo contesta se queda asignada esa persona automaticamente para cuando se tenga respuesta de ese ticket, ¿como puedo configurar que ningun ticket se auto asigne? que todo sea manual
                                  • Custom Time Range Support for Zia Trending Auto Tags in Zoho Desk

                                    Dear Zoho Desk Team, We’d like to formally request an enhancement to the Zia’s trending auto tags feature to better support our business needs. 🧩 Use Case: We actively rely on Zia auto-tags to: Monitor recurring customer issues. Detect emerging trends.
                                  • Enhanced Tag Filtering and Selection in Zoho Desk Custom Views

                                    Dear Zoho Desk Team, We’d like to request enhancements to the tag filtering and selection capabilities when creating custom views in Zoho Desk. 📝 Current Limitation: While it is currently possible to create a custom view using tags and status as criteria,
                                  • Creator help with max value

                                    Hi! I come from MS access and I want to build in creator. I have a Registration App I want to make. The main table is called Registrations and I have a subform called RegProgress where the user can indicate the progress by selecting one of 6 steps. Those
                                  • Can't call function with ZML Button

                                    Hi, I have a page where I have a subform and a button made in ZML. My initial goal is simply that onClick, I call a function that updates multiple entries. Even though the function exist, I am unable to reference it. If I try to reference it manually
                                  • How do i move multiple tickets to a different department?

                                    Hello, i have several tickets that have been assigned to the wrong department.  I am talking about hundreds of automatically generated ones that come from a separate system. How can i select them all at once to move them to another department in one go? I can select them in "unsassigned open tickets view" but i can't find a "move to another department" option. I also can't seem to assign multiple tickets to the same agent in that same view. Could somebody advice?
                                  • Creating credit cards with sub-accounts for employee cards?

                                    I'm trying to figure out how to go about reconciling our credit card accounts in Zoho Books since each credit card pulls into its own account, rather than employee cards pulling into a sub-account of the primary card. Ideally, I'd like to be able to setup
                                  • ZUG is Hitting the Road — Across the USA!

                                    We’re bringing the Zoho User Group (ZUG) meet-ups back to various cities across the United States — and we’re more excited than ever to reconnect with our incredible community! Whether you're a seasoned Zoho user or just getting started, this event is
                                  • Ask the Experts 20: Level up your customer service with Zia

                                    Hello everyone! We're excited to reconnect with you again. The recent sessions of our Ask the Experts series have contributed to valuable conversations, beginning at the live sessions and evolving into one-on-one conversations and remote-sessions where
                                  • Custom Canvas Tabs

                                    Hi Team Can you advise if there is a particular tab layout I need to be using in Canvas in order to have the numbers show on the tab ie for a new note it would show 1 as like with the standard view? The below is what I have: This is the desired outc
                                  • In focus: Profile permissions in Radar

                                    Hello everyone, Imagine a help desk where everyone can access everything without restrictions. Newbies could answer tickets without supervision, agents would meddle with system settings, and contract employees would have unrestricted access to business
                                  • Deluge Script wishlist...

                                    Just throwing it out there ;) 1. += operator. Pleeeeease no more var = var + "test"; 2. Ternary Operator for if/else. Man I wish I could just go myVar = myVar == "test" ? "it is test" : "it's not test" instead of having to write out a huge if/else block of ugly brackets.  3. square bracket notation for referring to record fields and map views.  This would make it terribly hard for Zoho to debug which might break the whole goal of saving new users from themselves. But here's why it would be extremely
                                  • Selling a product consisting of several components

                                    hi all,  I have a small issue with inventory items, I am a perfume company, and my product consists of many items,  how can I manage this, from purchase the items and convert them to be one item ready for sales  - using ZOHO platform ..
                                  • How to Move Behavior, Acquisition, Polls & Forms Data from Zoho PageSense to Zoho Analytics?

                                    Hi Zoho Community, I'm looking for a way to transfer data from Zoho PageSense to Zoho Analytics, specifically: Behavioral data (clicks, scrolls, heatmaps, etc.) Acquisition data (traffic sources, campaigns, etc.) Polls and forms data As far as I can tell:
                                  • [Zoho Flow] Problem using "Send document for signing"

                                    Hi, I get the error "Zoho Writer says \"An Internal Server Error occurred while processing this request.\"" cant understand what exactly the problem is. Any ideas? Thank you KR, Victoria
                                  • Fusion d'un champ image avec Writer ou Template CRM

                                    Il semble impossible pour le moment de fusionner dans le CRM un champ de type image vers un template. Par exemple : fusionner une image située dans le champ devis du CRM vers le template 'inventaire-devis'. Impossible également de réaliser cette opération
                                  • Gestion de suivi des expéditions

                                    Le suivi des expéditions est un élément indispensable à une gestion réussie de la chaîne d'approvisionnement. Aussi bien le fournisseur que le client peuvent bénéficier de la transparence et de la responsabilité apportées par le système ; ce dernier fournit
                                  • Transform Numeric Values using st, nd, rd, th or Convert Numerals to Ordinal Form - Deluge

                                    Please Use this sample Code This_Day_Date = zoho.currentdate.toString("dd"); value1 = "th"; if(This_Day_Date.right(1) ="1" && This_Day_Date != "11") { This_Day_Date = This_Day_Date+" "+"st"; } else if ( This_Day_Date.right(1) = "2" && This_Day_Date !=
                                  • How to drag and drop documents from Workdrive to Outlook

                                    Does anyone have an idea on how to drag and drop a document stored in workdrive into an email as an attachment in outlook? Similar to how it is possible to drag and drop documents from File Explorer stored documents straight into outlook as a static attachment.
                                  • Enhance Delay Configuration in Zoho Flow

                                    Dear Zoho Flow Support Team, We are writing to request an improvement to the delay configuration process within Zoho Flow. Currently, users are required to manually enter the exact delay duration (e.g., "2 days") in the delay block. This can be time-consuming
                                  • incoming email not blocked

                                    I am continually having to add emails and domains to my blocked list, but Still get an occasional email that is on the lists but does not get blocked. Suggestions?
                                  • Showing Amount Achieved Towards Target on Zoho CRM Dashboard

                                    I thought I'd create this post to stick a flag in the ground. My requirement: To create a visual gauge/bar chart in my CRM Sales Team Dashboard so salespeople can see their progress towards their monthly/quarterly/annual targets. The problem: After several
                                  • Reports for "current user"

                                    <Note: Topic relocated from "Start a discussion" to "Ask a question". Former post deleted.> Is it possible to specify an advanced filter for "whoever is logged in", instead of having to pick a specific user? I want to create one report the can be used by all members, but will only show data that belongs to the person logged in. When setting up the report, I want to use an advanced filter that is something like "Lead owner" "is" "${CURRENTUSER}". So the generated report will be specific to the member
                                  • Global Subforms

                                    Hey 👋🏼 We have a few subforms to calculate detailed offers for customers of car dealerships. These subforms are used in different modules and we need to create snapshots of them in different cases for documentation reasons. For example, an approved
                                  • Add Subform Field based on Record Field

                                    Hi All, I am struggling with finding a solution that can populate a subform field based on an existing field on the record. Use case is I have added Current Exchange Rate on a quote as a custom field, I then have a subform with Quoted items that include
                                  • Where are scheduled emails stored?

                                    After you schedule an email to go out through the CRM, how do you go about changing that scheduled email? Or even where can I see the list of emails scheduled to go out? They are not listed in my Zoho Mail account in Outbox which has been the only answer
                                  • Sheets are unbearably slow

                                    I'm doing some extremely simple sheets. Like 2 sheets each with 200 lines and 10 columns and a simple vlookup. ABSOLUTLY can not wait 20 secs to flip between sheets. What's up? anyone else having this trouble? Been this way for about 4 days now. Both
                                  • Rich text support for Notes

                                    Hi! Is there an opportunity to add Rich text field to Zoho CRM? We need a field that can save the HTML-formatted text in it. It's crucial for our business. Moderation Updates: The votes for supporting Rich Text for multi-line fields is captured in the
                                  • Colour Coded Flags in Tasks Module List View

                                    I really like the colour coded flags indicating the status of the tasks assigned to a Contact/Deal in the module list view. It would be a great addition to have this feature available in the list view of activities/tasks. I understand you have the Due
                                  • Next Page