Generating an OAuth 2 token for Cliq

Generating an OAuth 2 token for Cliq

OAuth 2.0 protocol is a way to authorize and authenticate API requests. It allows third party application developers to let their users access and use the resources securely. This post will walk you through the steps involved in generating an OAuth 2 token for Cliq.

Follow the steps given below to know more on how to generate an OAuth 2 token for Cliq.


Step 1: Generate Client id and Client secret 


You will need to register your client app before getting started. A registered client app will be assigned a Client ID and a Client Secret which will be used in the OAuth flow. The Client ID is a public identifier for applications. Although it is public, it is best that it is not guessable to prevent attacks on the arbitrary applications possibly. On the other hand, the Client Secret is a secret only known to the application and the authorization server. 

  1. Visit the Cliq developer console and register your client application and include the following details
  • Client Name : The name of the application that you want to register with. This name will be shown in the consent displayed to the user while granting access to the required scopes.
  • Client Domain: A domain name to be used in the URL to identify your brand name uniquely.
  • Authorized redirect URL's: Callback URL to which user's will be redirected upon successful authorization.
      2. Click on the Create button.

Step 2: Authorization by generating a grant token 


The second step is to redirect the user of the client application to an authorized endpoint (https://accounts.zoho.com/oauth/v2/auth). Cliq will ensure the consent for the permissions that your app requests. In this step, after the consent is obtained, Cliq will redirect to your app along with the code that can be used in generating an Access token.

Type in the URL along with the mandatory parameters given below.

https://accounts.zoho.com/oauth/v2/auth?scope={scope}&client_id={client_id}&state=5466400890088961855&response_type=code&redirect_uri={redirect_uri}&access_type=offline 

Note:Mandatory parameters are indicated with a *.

Parameter
Description 
scope*
Scope helps you access application data. 
You can include multiple scopes by separating them with a comma.
For example (ZohoCliq. Channels.READ,ZohoCliq.Channels.UPDATE). 
client_id*
The client-id obtained while registering your application.
state
This parameter is used to maintain the state between the request and callback.
response_type*
The value of the param response_type should always be code.
redirect_uri*
It specifies the URL to which the page is redirected along with the code when the user grants an access.
access-type
Enter the access type as online or offline. 
online- To generate only the Access token.
offline- To generate both the Access and the Refresh Tokens.

Step 3: Generating Access and Refresh tokens 

The value of the code parameter obtained in the previous step will be used in generating the Access and the Refresh token. 
Make a POST request to the following URL along with the parameters mentioned below. 

https://accounts.zoho.com/oauth/v2/token?code={code}&grant_type=authorization_code&scope={scope}&client_id={client_id}&client_secret={client_secret}&redirect_uri={redirect_uri} 


Parameter
Description
code*
The authorization code obtained while generating the grant token.
client_id*
The client-id obtained while registering the application.
client_secret*
The client-secret obtained during the application registration.
redirect_uri*
Include the redirect URI mentioned while registering your client application.

grant_type*

authorization_code
scope
Mention the scope for your extension.

Note: The generated code is valid for only one minute.
On making a successful request, you will receive the following response
  1. {
  2. "access_token": "1000.365170ed0e63c47bf759439c1897fee0.7c3a098808532004faba21ff291ec296",
  3. "refresh_token": "1000.368e377f885b7e2ff696479625b3e150.6cad850717614193bddbf489b6a437d6",
  4. "api_domain": "https://www.zohoapis.com",
  5. "token_type": "Bearer",
  6. "expires_in": 3600
  7. }
  1. access_token - Access token to access Zoho Cliq APIs.
  2. refresh_token - Refresh tokens to generate new Access tokens.
  3. api_domain - Domain name of the API. Use this domain in your requests to make API calls to Zoho Cliq.
  4. token_type - Type of the token obtained. Bearer in this case.
  5. expires_in - Time in milliseconds after which the token expires.

Note: 1. Each access token is valid only for an hour
2. Refresh tokens do not expire and can be used any number of times to generate new access tokens. 

Step 4: Generating the Access token from the Refresh token

Now to generate a new Access token, use the refresh token from the previous step. 
Make a POST request to the given URL along with the parameters mentioned below.

https://accounts.zoho.com/oauth/v2/token?refresh_token={refresh_token}&grant_type=refresh_token&scope={scope}&client_id={client_id}&client_secret={client_secret}&redirect_uri={redirect_uri}

Parameter

Description
client_id*
The client_id obtained while registering your application.
client_secret*
The client_secret obtained while registering your application.
redirect_uri
The redirect uri mentioned during the client registration.

grant_type*

refresh_token
refresh_token*
The refresh token obtained in the previous step.

scope*

The suitable scope for your extension.

Note: A user in an organization can have a maximum of 20 refresh tokens and each refresh token can have a maximum of 30 active Access tokens.



So that was all about generating an OAuth 2 token for Cliq. In case of any queries please do comment below. We'd be happy to assist you.

Regards,
Divya P 
Cliq













    • Sticky Posts

    • Customer payment alerts in Zoho Cliq

      For businesses that depend on cash flow, payment updates are essential for operational decision-making and go beyond simple accounting entries. The sales team needs to be notified when invoices are cleared so that upcoming orders can be released. In contrast,
    • Automating Employee Birthday Notifications in Zoho Cliq

      Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
    • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

      Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
    • App Spotlight : PagerDuty for Zoho Cliq

      App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
    • Automate your status with Cliq Schedulers

      Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick
    • Recent Topics

    • Create Tasks in arbitrary Zoho Project triggered from CRM [Zoho CRM]

      Community, hello What I'm trying to do is to create a Zoho Project when a Deal is created in CRM and then to be able to add tasks to this Project also from Zoho CRM with the trigger (Blueprint/ Workflow). I succeeded in creating Project using Zoho Flow,
    • job opening status is locked and and I cannot change it

      Dear Support I am using standard plan. The job opening status is locked and and I cannot change it.
    • IDN domain

      Why I can't use my domain www.blažek.com I do not want use unfolded shape www.xn--blaek-wib.com in my mail. Can you help me please?
    • Gmail - Error 553 Relaying Disallowed

      Hey Zoho, I have just set up my mail server and added a couple of email accounts. I've verified my domain and added the mx records with my registrar (namecheap.com) What I'm trying to do is to be able to send email from my domain through Gmail.  In Google
    • Candidate status change

      I am trying to change candidate status from "interview scheduled" to "hired". Where do I do this at?
    • How can I set up my contacts so that all users can have them on hand when they sign in?

      Hi.  For my business I would like to set up the Contacts so they are available for any user. 
    • Sharing Knowledge Base articles across multiple departments

      It would be useful to share some Knowledge Base articles across multiple departments where they are applicable, rather than having to go into other departments to find the article you're looking for. For example. Our reception uses the 'Admin' desk whereas our IT guys use the 'Support' desk, however both divisions would find KB articles about our company intranet useful. Reception does not have access to the support desk, so cannot see articles created in the Support KB. Perhaps you could install
    • Getting Project Template List using the REST API

      I am trying to confirm that I can use the REST API to create a project using a project template. The API documentation indicates this is possible by providing the Template ID, but it is not clear at all how to get a list of available Project Templates
    • Where do we manage tags?

      Where is the page where we can view all tags and manage them (like change a tag name to something else or merge tickets under a particular tag with another)?
    • Custom Return Path - Host Name

      Hi there, I've successfully set up SPF/ DKIM for Marketing Automation, but struggling to complete the Custom Return Path. I'm settting up on Wix. What should the host name be for the CNAME record? In Zoho Help it just says: "type your host name (sub-domain
    • Trouble Connecting Zoho Mail via IMAP in n8n – Need Help

      Hi everyone 👋, I'm trying to connect my Zoho Mail account to n8n using the IMAP Email Trigger node, but I'm facing issues getting it to work fully. ✅ Here's what I’ve done so far: ✅ IMAP access is enabled in my Zoho Mail settings ✅ I’m using the correct
    • How to send Messages to Leads/customers

      I’d like to inquire about the process for sending messages or follow-up communications to customers directly from Zoho CRM. Could you please guide me on the best way to do this—whether via email, SMS, or any integrated messaging feature? Additionally,
    • Daily-rate for projects

      I am billing my client through daily billing rates; for Zoho Books projects, only hourly rates can be set up. Please enhance this. Thanks.
    • AI feature in Zoho Desk suggesting answers based on past ticket threads

      Hi I would like to suggest something that would be very useful : instead of suggesting answers based on the Knowledge Base, I think it would be great if Zia could analyze the history of all customer and agents threads, to suggest answers in new tickets.
    • Admin Console Email

      I can't remember the admin console email or password. How do I find that out?
    • help me! the button "remove zoho ad" is not responding

      help me! the button "remove zoho ad" is not responding, kindly advice. please to check the follows : https://sitepreview-643549202.zohositescontent.com/previewsite https://sitebuilder-643549202.zohositescontent.com/builder thanks,best  regards
    • Zoho Forms API

      Is there any way to get all form entry list using API? Looking forward to hear from you
    • Free tier

      Does a completely free tier Zoho email still exists? If so why am I receiving email reminders that my account would expire in 2 days
    • Disable "skip to content" in Help Center

      Our users used to be able to press the tab button to skip between fields when submitting a new ticket in the help center. Now it pulls up the "skip to content" button in the top left corner. I know this is an accessibility feature, but is there any way
    • Mail Data Migration

      Hello Team, I have an issue with my organization mail data migration from Google to Zoho. We used Google Workspace before now but decided to change to Zoho to enjoy your service. I have successfully created an account and 1. Complete Domain verification
    • Prompting email addresses when sending an email

      Hi, I was just wondering if it was possible to disable the prompt / suggestion of email addresses when you begin typing an email address into the TO or CC box? Some of the email addresses that are being suggested are people that no longer require the
    • This is a HTML email and your email client software does not support HTML email!

      I have a small business, recently the email notification is coming like this to me, can anyone please help me? I am not so IT savvy -----=_NextPart_b4583c76c623900f59ad5b420c6da260 Content-Type: multipart/alternative; boundary="----=_NextPart_b4583c76c623900f59ad5b420c6da260_alt"
    • How to insert a ZohoUser in a subform field?

      I am building an new external web app that uses the ZohoCRM REST API (v8) to push data to Zoho. How do I use the ZohoCRM REST API to insert ZohoUsers into a subform field? I've tried several approaches and none of them have worked - inserting the ID as
    • Unable to receive emails

      Hello - I set up an email account for my domain. I can send emails but cannot receive them. I believe the issue might be with incorrect IMAP configuration (?) - but im not sure and cant find where this is on the platform. Im using Zoho hosting for the
    • Zoho Account delete function

      Hello Zoho support team The issue is as follows: Step1: Created an account community@bisonenergy.net Step2: Deleted this account. Step3: Created the new group mail using the same mail address, but the data already exists. So I have to change the name
    • help, 554 5.1.8 blocked

      got this blockade, i don't know why?
    • Not Receiving Emails from Gmail, but Other Providers Work Fine

      Hello, I'm experiencing an issue where my Zoho Mail account does not receive any emails sent from Gmail addresses. However, I can successfully receive emails from other providers such as Hotmail and Yahoo. There are no problems with sending emails—I'm
    • Basic String Search Not Possible in CRM Deluge – Feature Request or Workaround?

      Hi all, I’m trying to solve what should be a very basic automation task in Zoho CRM Deluge: Find the first 11-digit number anywhere in a string (specifically an email subject). In almost any programming language—even 1980s BASIC!—this is a trivial loop:
    • Reencaminhamento de e-mails.

      Boa tarde, gostaria de saber se tem a possibilidade de realizar o reencaminhamento de um e-mail especifico. Ex. Eu recebo alguns e-mails de um remetente e gostaria que o meu amigo de trabalho também recebesse esse e-mail, somente deste destinatário, é
    • Knowledge base articles is now available in the Zoho Desk mobile app!

      Hello all,   As a customer service agent, every day you might have to deal with many questions and issues reported by the users. With Knowledge Base, you can reduce the issue resolution life cycle for your organization.   We are delighted to announce that we have brought in support for 'Knowledge Base articles' in the Zoho Desk iOS mobile app.  This feature is already available for Android users.   KB articles are available to iOS users in the latest version of the app (v2.4.9). You can update the
    • Set Default Payment Method & Default account

      Hi, I would like to know how to set the default payment method and default bank account when recording payments in zoho books. At present we have to change these fields everytime we record a payment, which leads to potential error and as we have a very
    • More than one "Other" response in a Multiple Choice (Many Answers) question type?

      Is there a way to have more than one "Other (Please Specify)" with a short response as an option to a Multiple Choice (Many Answers) question? I understand there may be other ways, but I am looking for this way specifically as it would be best for the
    • Zoho Surveys

      Dear Zoho Support Team, I hope this message finds you well. I am writing to inquire about the availability and documentation for the Zoho Survey API. Background: I am currently working on a project that requires programmatic access to survey data and
    • Help Needed: Jira to Zoho Projects Migration — Tickets Imported as Unassigned & Comments Under Admin Name

      Hi Zoho Team and Community, We recently completed a migration from Jira to Zoho Projects using the official import method outlined in this Zoho Help Article. Issue Summary: We had already added all users to Zoho Projects before the migration, using the
    • Zoho Finance Estimate to Deal Attachment

      Hi, I'm trying to fetch estimate pdf from zoho books and upload it as deal attachment without success. any tips how to achieve this?
    • Journeys - how do i branch on contact call result

      Hi all. I want to branch based on the Call result field in contacts. Any idea how I can do this? Also what is the best way to have this condition checked at each step? Thanks!
    • The 3.1 biggest problems with Kiosk right now

      I can see a lot of promise in Kiosk, but it currently has limited functionality that makes it a bit of an ugly duckling. It's great at some things, but woeful at others, meaning people must rely on multiple tools within CRM for their business processes.
    • Perform custom actions from the Ticket interface using Buttons

      Hello everyone, We have introduced an option to add Buttons to the tickets, which will facilitate direct access to other applications, websites, allows execution of custom workflows, and more. Accessibility and visibility of buttons The buttons can be
    • Inserting a video from library in microsite

      Hello, We have uploaded videos in our space library. We created a new event and want to use the videos in our main page our microsite. It's possible to selected image from the library, but no videos. Only URL are accepted, but videos in library have no
    • UUIDs

      Has anyone coded a Universal Unique Identifier (UUID) generator in Deluge?
    • Next Page