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

    • 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
    • Convert a message on Cliq into a task on Zoho Connect

      Message actions in Cliq are a great way to transform messages in a conversation into actionable work items. In this post, we'll see how to build a custom message action that'll let you add a message as a task to board on Zoho Connect. If you haven't created
    • Cliq Bots - Post message to a bot using the command line!

      If you had read our post on how to post a message to a channel in a simple one-line command, then this sure is a piece of cake for you guys! For those of you, who are reading this for the first time, don't worry! Just read on. This post is all about how
    • Cliq Bots - How to make a bot respond to your messages?

      Bots are just like your buddies with whom you can interact. They carry out your tasks, keep you notified about your to-dos and come in handy when you need constant updates from a third party application.  So, how can you make your bot respond to a message? The bot message handler is a piece of code triggered when a message is sent to the bot. Message handlers help you customise your bot responses to make it look conversational. The message input from the user can be either a string or an option selected
    • Cliq Bots - Get notifications about any action on an application with the incoming webhook handler!

      Webhooks can be used to get notified about events happening in other applications inside Cliq. All bots in Cliq have their own incoming webhook endpoint. This makes it simple to post messages to the bot from external applications. Unlike the send message
    • Recent Topics

    • Can you modify "Last Activity Time" in deluge? If so what's the field name?

      I need to perform some bulk modifications on records in the Leads module, but I need to avoid changing the "last activity time" or "date modified" because I am using those fields to filter and sort leads for follow-up action. I cannot find an answer anywhere
    • Included in Zoho One?

      Will LandingPage eventually be included in Zoho One?
    • Console error with widget in View mode, not present in Edit Mode with ZOHO.CRM.API.updateRecord(config)

      hello i have that function to update an account records (from a widgets created with sigma) function handleCopyButtonCRMClick() { console.log('handleCopyButtonCRMClick'); /* * Fetch Information of Record passed in PageLoad * and insert the response into
    • Calendar - "pop up" locations

      One of the attractive features of google calendar and outlook calendar is that locations for events will start to automatically populate the location drop down menu as you type. Adding this feature to zoho calendar would be the final feature i need.
    • How to see changes with ZOHO.CRM.API.updateRecord(config) without reload page

      hello got a widget in account, trigger with a button i copy data to account when click on a button, in my popup All is working well. But i need to reload the page to see the update. How can i see the changes without reloading page, only when close the
    • Reports - custom layout - duplicate report

      Do you also have this problem and what is the possible solution? I duplicate a report that has a "custom layout". Unfortunately the custom layout is not duplicated. To be improved for a future release by Zoho. I export the custom layout and import it...
    • Select CRM Custom Module in Zoho Creator

      I have a custom module added in Zoho CRM that I would like to link in Zoho creator.  When I add the Zoho CRM field it does not show the new module.  Is this possible?  Do i need to change something in CRM to make it accesible in Creator?
    • Zoho LandingPage is integrated with Zoho One!

      Greetings to the Zoho One users out there! We're delighted to let you know that Zoho LandingPage is available in Zoho One too! With Zoho LandingPage, you can host custom-made landing pages, and persuade the visitors to dive deeper by making further clicks,
    • LinkedIn verification link and otp not receiving

      For the last 2 to 3 weeks I'm trying to verify my LinkedIn account to access my company's LinkedIn page, Linkedin is sending verification links and codes to this email address but I have not received any codes or links. Please help me here. Looking forward
    • Unlocking New Horizons: A Year in Review

      As we bid farewell to 2024, let's celebrate and revisit the key highlights of the year. From adding a new edition to cross-platform enhancements, here’s a roundup of all the feature updates designed to simplify accounting, optimize financial management,
    • 2024 Wrap: Rediscover these features and enhancements in Zoho CRM

      Hello everyone! I wish all of you a joyful and prosperous 2025! As we welcome 2025, I’m excited to share a recap of the year 2024 and highlight some of the coolest new features and enhancements we’ve added to the Zoho CRM platform. Last year, we announced
    • A quicker way to provide accountants access to Zoho Books, similar to Xero and Quickbooks

      Hey guys, I'm finding the procedure to give access to an external accountant to Zoho Books less than ideal. Having to create an account by Zoho instead of myself, and then wait for it to be given a license to then pass to the accountant seems a bit time
    • "Mark as Spam" not working as expected

      Dear support, in the below scenario, clicking on "Mark as spam" identifies only the first of the checked emails as spam, removes that email from the visible list and leaves the rest of the list still visible & unchecked. I've tried check-marking them
    • Upgraded to Zoho One but Zoho Meeting still says Free Plan

      I signed-up for the Zoho One plan. When exploring the applications included, I came across a problem with Zoho Meeting. It says it's the free plan. I emailed support but they sent me a link that doesn't work and, when I found the article on my own, it
    • This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details

      Hello, Just signed up to ZOHO on a friend's recommendation. Got the TXT part (verified my domain), but whenever I try to add ANY user, I get the error: This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details I have emailed as well and writing here as well because when I searched, I saw many people faced the same issue and instead of email, they got a faster response here. My domain is: raisingreaderspk . com Hope this can be resolved.  Thank you
    • Self Client Authorization Issue

      Hi. Trying to test the api integration for Zoho Desk with the Self Client - Client Credintials flow method. I've created the self client, obtained the client id and secret, inputted "Desk.tickets.ALL" as my scope, and "ZohoDesk.[My Zoho Desk Org ID]"
    • This mobile number has been marked spam. Please contact support.

      Hi Support, Can you tell me why number was marked as spam. I have having difficult to add my number as you keep requesting i must use it. My number is +63....163 Or is Zoho company excluding Philippines from their services?
    • Update Candidate Status Through Workflow in Blueprint

      Hi Team,  We have a blueprint built out with custom functions that update particular fields based on candidate actions. When particular fields are updated we need to move the candidate forward in the blueprint. We tried to do this through a workflow,
    • Zoho Canned respond do have a huge lag issue.

      Previously the Zoho canned respond works perfectly ... on once server update and all the Canned respond enconter huge lag... in the end cause most of the canned respond just shown code with /xxx and not the sentence....
    • Pay Contractor Timesheets

      I have contractors that fill out a timesheet. Each hour must be assigned to a current client. I need the easiest way to get the contracts paid. They are paid on an hourly bases. How can this be done?
    • ShipStation and Zoho Inventory

      Hello, I am looking to sync zoho inventory with shipstation ZOHO INVENTORY           SHIP STATION Sales Order  ==>  create ORDERS INVOICE  <==    Shipments What exactly does BETA mean on the Shipstation connector?  This is required for me to sign-on in the next month. Thanks in advance for your efforts
    • Saving slide elements

      I have created grouped items including text and animation that I want to use in later slides. (Like an animated logo) Is there a way to save these grouped elements in my library?
    • Are downloadable product available in Zoho Commerce

      Hi all. We're considering switching to Zoho Commerce for our shop, but we sell software and remote services. Is there a features for downloadable products? I can't find any information about this. Thank you very much Alice
    • Function #10: Update item prices automatically based on the last transaction created

      In businesses, item prices are not always fixed and can fluctuate due to various factors. If you find yourself manually adjusting the item rates every time they change, we have the ideal time-saving solution for you. In today's post, we bring you custom
    • Writing on sketch cards is bugged when zoomed in

      When zoomed in, it writes a noticeable distance above or to the side of where you're actually trying to write. The further you're zoomed in, the more noticeable it is. Zooming is also entirely absent on the desktop version.
    • Move site from WIX to ZOHO Sites

      I have a simple website on WIX.  I am wondering if someone is available to help me move this website - https://www.videothreezero.com/ to ZOHO.  Michael  Boston
    • zoho calendar week view - "super compact by default"

      every time i go to my calendar i have to re-engage the "super-compact view" for the week view...is there a way to make "super-compact" a default view so I dont have to keep on setting it manually?
    • Move a Contact from Current Account to a NEW Account

      I do not believe the functionality to Move a Contact from a Current Account to a New Account is not available. Please someone tell me I am missing something! I have been through designing, developing, using and selling CRM systems for over 25 years and had this functionality20+ years ago in other CRMs.  In the real world people move from one organisation to another. In the sales, finance and technical world it is nice to see the communication history with that person in their old account and also
    • Change work hours per day for employees

      Hello, Is there a way to modify the work hours per day for employees in Zoho projects? This would be helpful for resource allocation to more accurately see when an employee who works 35 hours a week vs 40 hours has a full schedule. Thanks.
    • Zoho CRM Automation Help: Send Email When Fault is Marked as Done & Module Relationships

      Hi everyone, I have the following User-Created Modules in Zoho CRM: Clients Assets Faults Handymen Every client can have multiple assets. Every asset can have multiple faults. Every fault is assigned to one handyman. What I Want to Achieve: ✅ I want to
    • Adding New Domain to Zoho mail

      Hi, I have one Zoho account already called for example "Awesome Animals". Under this account I have one domain already setup with zoho mail, example: - awesomecats.com I have another website as well which I want to add under this "Awesome Animals" account,
    • I cannot receive emails.

      I need help, I've tried everything but I still can't receive emails from other people. I can send it but I can't receive emails, When I created the email it was all in order and suddenly I can't get emails from anyone anymore.
    • Incoming Gmail Email Not Coming Into Zoho

      My outbound email from Zoho is working, but when people respond to the email, it's not coming back into Zoho. I can see it when I'm in Gmail, but it's not in Zoho.
    • Não foi possível enviar a mensagem;Razão:554 5.1.8 Email Outgoing Blocked.

      Preciso de ajuda não consigo enviar emails,conta recen criada
    • ERROR_CODE :554, ERROR_CODE :rejected due to spam

      Please verify bounce message: This message was created automatically by mail delivery software.  A message that you sent could not be delivered to one or more of its recipients. This is a permanent error.  xxx@thalesesec.com Error, ERROR_CODE :554, ERROR_CODE :rejected due to spam content yyy@thalesesec.com Error, ERROR_CODE :554, ERROR_CODE :rejected due to spam content  Received:from RMRPC (190.102.146.226 [190.102.146.226]) by mx.zohomail.com with SMTPS id 1376415816667533.3706558194896; Tue,
    • Request to Customize Module Bar Placement in New Zoho CRM UI

      Hello Support and Zoho Community, I've been exploring the new UI of Zoho CRM "For Everyone" and have noticed a potential concern for my users. We are accustomed to having the module names displayed across the top, which made navigation more intuitive
    • Expand Zia's Language Support and AI Capabilities

      Dear Zoho Desk Support, I would like to submit a feature request to improve Zia, the AI-driven support assistant in Zoho Desk. Currently, Zia only supports the English language, while other AI agents such as Gemini, ChatGPT, and Claude can work with a
    • Average Costing / Weighted Average Costing

      Hello fellow maadirs. I understand Zoho Books uses FIFO method of dealing with inventory costing, but do you guys have any plans to introduce average costing? We indians need average costing. It's part of our culture. Please. I beg thee. Thanks.
    • Links in Instagram

      Hi there, I have been using Later for a while now but keen to come back to Zoho Social as Later doesn't offer tagging of pages on Facebook but they offer something Zoho doesn't. You can add a link to your bio which opens up your profile feed where images
    • Zoho Social integration with Zoho Flow

      Is there any plans for Zoho Social integration with Zoho Flow?
    • Next Page