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

                                  • Adding Public Holidays to the Calendar

                                    Hi, How do you add a public holiday to the calendar, we are closed on public holidays but if someone has requested holidays over that time how do we avoid the day being deducted as this is already a paid holiday? 
                                  • Your inbox called; it wants less clutter

                                    Inbox full of ghosts? Let Auto-Close do the haunting. Ever stared at your support inbox wondering why half the chats are just… sitting there? No reply, no closure, just hanging like unread messages from a advertising company. Let’s fix that. With Auto-Close,
                                  • an issue in Zoho CRM where the workflow rule is not triggering

                                    H I’m currently facing an issue in Zoho CRM where the workflow rule is not triggering when a new lead is created through a webform. I’ve double-checked the criteria and field updates, everything seems fine but it still doesn’t fire. Has anyone faced this
                                  • Feature Request: Mass update selected Contacts to Accounts

                                    I can't believe this isn't an ability already. It's a quick fix that would save hours of manual entry time. This looks like it had been requested 3-4 years ago with no answers from staff! Please add all contact fields into the "mass update" menu. You
                                  • How to add the other customer to the list of customers

                                    So I have a list of customers with the option of other. So when I select other and the new customer, how to get to it be saved to that list in creator.
                                  • Automate and Personalize Engagement for Campaign Leads Using Zoho SalesIQ Chatbots

                                    Hi everyone! In our last post, we explored how to identify, qualify, and nurture leads using SalesIQ Triggers and Zoho Campaigns integration. To recap, once visitors meet your criteria, you can add them to a Campaigns mailing list with Triggers. When
                                  • compensation module - salary - No decimals allowed regardless of currency

                                    In the United Kingdom we have calculations in GBP which has figures to 2 decimal points. When using either the basic salary or using the CTC with benefits etc. It will block any upload or entry which is not a round number! I have advised Zoho One and
                                  • Unable to add estimate field to estimate template

                                    I have the field "SKU" as part of my service data. I can also see it as a column when displaying the list of services. However, I have no way to include it on my estimate template because the field is not showing as a column field to include for the service/part
                                  • Adding Today's Date into an email template

                                    Is it possible to add today's date into an email template? Any help would be gratefully received.
                                  • Entry created or updated - not getting all fields

                                    I have a flow that fires on an entry being created or updated in a custom module in CRM.  It is only supposed to proceed if a particular field is false and once fired, immediately updates that field to true to avoid running multiple times.  For some reason,
                                  • Help createing Inventory Volume report

                                    I've been working with Zoho support for a few months now trying to develop a inventory volume report. Though they have been helpful, it never seems to generate exactly what we're looking for. I thought I'd turn to the community for further help. We've
                                  • Zoho Sprints - Timesheet Rejected

                                    Does a user get notified is his Timesheet entry has been rejected?
                                  • Sixth Insight - The Hidden C in Data

                                    The Wheels of Ticketing - Desk Stories The Hidden C in Data [Importance of clean data] Data cleaning Data cleaning ensures ticketing systems' data is accurate, consistent, and complete. This process includes eliminating duplicates, fixing errors, and
                                  • Simple Text Search Function

                                    Would it be too much to ask for a simple text search function? My slide decks are often simply collections of slides of a random over, and I often have to find the slide I need at a moment's notice. A text search function, no matter how rudimentary, would
                                  • KPI Widget would not load columns

                                    My Zoho Analytics would not load columns on KPI Widgets, is there anyone who could help me on this?
                                  • Introducing the calendar view for Bigin's Activities module

                                    Hello everyone, We're excited to announce the calendar view in Bigin. This view presents all tasks, events, and calls in an intuitive and visually appealing interface, and will be set as the Activities module's default landing page, ensuring you have
                                  • Its 2022, can our customers log into CRM on their mobiles? Zoho Response: Maybe Later

                                    I am a long time Zoho CRM user. I have just started using the client portal feature. On the plus side I have found it very fast and very easy (for someone used to the CRM config) to set up a subset of module views that make a potentially extremely useful
                                  • Add documents/uploaded files in Zoho CRM records that can be accessed by all team members?

                                    Hi, I'm building out our small business' Zoho CRM implementation and are on a Zoho One plan. We do LED Lighting Projects for customers, and collect data like customer utility bill PDFs, and pictures of existing lighting that we want to keep in one centralized
                                  • Updates for Zoho Campaigns: Merge tag, footer, and autoresponder migration

                                    Hello everyone, We'd like to inform you of some upcoming changes with regard to Zoho Campaigns. We understand that change can be difficult, but we're dedicated to ensuring a smooth transition while keeping you all informed and engaged throughout the process.
                                  • Customizing Helpcenter texts

                                    I’m customizing the Zoho Desk Help Center and I’d like to change the wording of the standard widgets – for example, the text in the “Submit Ticket” banner that appears in the footer, or other built-in widget labels and messages. So far, I haven’t found
                                  • Zoho Desk - I am no longer receiving email notifications when comments are made on tickets

                                    I still receive other notifications via email (e.g., new tickets and replies) - however beginning May21, I no longer receive notifications on comments (whether private or public) - I have confirmed that notifications are toggled on for agents within system/notification
                                  • Issues with Campaign Results Sync Between Zoho Campaigns and Zoho CRM

                                    Hi everyone, I’m experiencing an issue with the integration between Zoho Campaigns and Zoho CRM. When I send campaigns from Zoho Campaigns, the results shown in Campaigns (such as the number of emails sent, opened, and clicked) do not exactly match the
                                  • Greek languge

                                    Hello, Is there any support for Greek language in the near future?
                                  • Import records with lookup field ids

                                    Hi Is anyone able to import records into Recruit via spreadsheet / csv which contain ids as the lookup values. When importing from spreadsheet lookups will associate with the related records if using record name, however when using related records id
                                  • Custom module history is useless

                                    Hi I am evaluating ZOHO DESK as my support platform. As such I created a few custom modules for devices assigned to employees. I want to be able to see the whole picture when a device was reassigned to someone, but the history shows nothing Is there any
                                  • Email rejected per DMARC policy

                                    Hi, We've got the return message from zoho like 'host mx.zoho.com[204.141.33.44] said: 550 5.7.1 Email rejected per DMARC policy for circlecloudco.com in reply to end of DATA command' We're sure our source IP address matches the SPF the sender domain
                                  • EMail Migration to Google Apps is Too Slow

                                    We are moving to Google Apps and the email migration is really slow. Anyway you guys check if this is a server issue?
                                  • How to import subform data - SOLUTION

                                    To all trying to import subform data, I might have a solution for you. First of all, for this solution to work, the subform data needs to be an independent form (not ad hoc created on the main form). Furthermore, this approach uses Excel sheets - it might not work using CSV/TSV. If this is true, then follow these steps: Import the subform records Then export these records once more including their ID Now prepare an import file for the main form that needs to contain the subform records Within this
                                  • Help center custom tab - link color

                                    I’m trying to add a custom tab to the main navigation in the Zoho Desk Help Center, for example to link to an external resource like a website. The problem is that any custom tab I add always shows up as a blue link – it doesn’t match the style of the
                                  • Organization API: code 403 "Crm_Implied_Api_Access" error for "https://www.zohoapis.com/crm/v2/org"

                                    Hello. I've developed an add-on that allows clients to synchronize data from Zoho CRM with the Google Spreadsheet. I am using the OAUTH2 protocol, so clients will have to authenticate into their Zoho account, and Zoho will send back to the app an access token which will be used to get data. Currently, there are about 100 clients, and everything works smoothly. Today I've found that a guy who could become a new client was not able to to get his organization data, because the application receiving
                                  • Pick list - Cannot save list "Special Characters not Allowed" error message

                                    Bulk uploading values. All values are pretty standard - with the exception of a "-" (dash). Like:  Industry - Prepared Food Is the simple dash a special character too? Jan
                                  • Zoho Projects API Error - API v3; Always HTTP 400

                                    Below I have uploaded my .py file I'm using: Always returns with response 400 :(( Console Logs: (venv) PS C:\Users\sreep\venv> python .\TimesheetBuddy.py Token file not found. * Serving Flask app 'TimesheetBuddy' * Debug mode: off WARNING: This is a development
                                  • Inquiry: Integrating In-house Chatbot with Zoho Desk for Live Agent Support

                                    Hi Team, We are exploring the possibility of integrating our existing in-house chatbot with Zoho Desk to provide seamless escalation to live agents. Our requirement is as follows: within our chatbot interface, we want to offer users a "Talk to Agent"
                                  • Zoho Mail will not set up in Thunderbird

                                    I am using Thunderbird 13.0.1 in Linux Mint 13 64-bit.  I cannot set up my Zoho IMAP email in this client.  This is evidently a common problem as evidenced by these postings in the Thunderbird forum: thunderbird can't seem to "find the settings" I cannot configure it for my zoho.com email account I can not get ZOHO to configure. Any suggestions? The best T-bird seems to be able to do is to refer these users to the Zoho forum. I believe the instructions in the Zoho help wiki are correct, although
                                  • Introducing an option to set comments to public by default

                                    Hello all, Greetings! We are pleased to announce that Desk's user preferences now brings an option to set a comment type as Public or Private by default. In addition to setting reply buttons as defaults, Agents or Admins can now choose to make their ticket
                                  • Increase size of description editor when creating new ticket

                                    Please can you consider making the description editor in the create new ticket form a resizeable area as by default, it is very small and there appears to be no way to increase the size of it.
                                  • Flutter Plugin Compatibility Issue: Unresolved Reference to FlutterPluginRegistry in zohodesk_portal_apikit

                                    I am integrating the zohodesk_portal_apikit Flutter plugin (version 2.2.1) into my Flutter project, but I am encountering a build error related to an unresolved reference to FlutterPluginRegistry in the file ZDPBaseActivityAwarePlugin.kt. Below is the
                                  • I need my MFA number. I am trying to log into my CharmEhr. account and I can't get in. Everytime I try to sign in, it says to enter my MFA #. I don't have it.

                                    Need an MFA #
                                  • CRM Plus Accounts and Products relationships

                                    Is there a way that an invoice that is paid, would add the products to the account record once it is delivered? I want to find an easy way that products will get added to the account record and assumed this would work. The benefit here would be that I
                                  • "Super Admin Login as Another User" for Zoho One

                                    Dear Zoho One Team, We would like to request that the "Super Admin Login as Another User" feature be extended to Zoho One, allowing Super Admins to access user accounts across all Zoho One applications. We understand that this functionality is currently
                                  • Next Page