Kaizen 133 Deciding on the type of applications self client or server based

Kaizen 133 Deciding on the type of applications self client or server based

Welcome back to the Kaizen series!

In this week's post in the Kaizen series, we will discuss self client and server-based clients in Zoho CRM. We will explain these two client types in separate videos, along with their practical application using Java SDKs.

How authorization is done in Zoho CRM?

In Zoho CRM, the protocol used for authorization is OAuth 2.0. OAuth 2.0 is an industry standard protocol specification that enables third-party applications or clients to gain delegated access to protected resources in Zoho via an API.

You can use self client when the app you develop is intended to communicate with your own Zoho account and it doesn't have a domain and redirect URL. You can also use this option when your application is a standalone server-side application performing a back-end job.

Scope

Scope is a set of permissions for which the token has to be generated for a client. OAuth2.0 scopes in Zoho CRM determine a client/web app's access rights to specific resources. Scopes dictate:
  • Resource accessed (e.g., Users, Modules, Files)
  • Permissible operations (e.g., ALL, READ, WRITE, CREATE, UPDATE, DELETE)

When you register an app in Zoho API Console, you typically choose a client type based on the type of usecase which you are trying to solve using the ap. The different client types available are 
  • Server-based
  • Client-based
  • Self client
  • Non-browser-based
  • Mobile-based

Self Client 

When your application does not have a redirect URL or a web UI, operating solely in the backend without requiring user interaction, self client type is the appropriate choice. 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.
A self-client is commonly employed when both the application and Zoho services are managed by the same person, aiming to establish secure communication between them. 
Here's a summary of the process of using self client type:
  • Register your app as a self-client in the Zoho API Console.
  • Obtain client details such as client ID and client secret.
  • Specify the necessary scopes for your app to access CRM data.
  • Obtain the grant token.
  • Your app should then initiate API calls to Zoho Accounts to create access & refresh tokens using Zoho CRM SDKs
  • Utilize this access token for API calls to Zoho CRM.


You can refer the sample code used in the video for data sync in the attached code.


Server-based Client

If you are developing an app that's intended for use by multiple Zoho accounts, you can use Server-based OAuth App. This app could be solving a special usecase for all Zoho accounts. The app should have both a dedicated backend server and web UI to handle the authorization process and the app's logic. The app redirects users to Zoho for the authorization process using a web browser. Users grant permission for the app to access their Zoho data on their behalf. The app will consume data for it's intended purposes on behalf of the user who authorized the app.



You can refer the sample code used in the video for lead management in the attached code.

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




    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns 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