Post message to a channel using a simple one-line command!

Post message to a channel using a simple one-line command!

Hi Everybody!

This post is all about posting a message in a Channel using cURL, Wget and PowerShell. cURL is a light-weight, command interface used to transfer data to a server. The steps are pretty easy! 

The three most important points here are 
  • Generating an Auth token
  • Get your Channel Unique Name
  • Form your message as a JSON structure
Generating an Auth token

To use the 'Messaging API' you'll need Cliq's authentication token from Zoho Accounts. Generate an auth token by hitting the below-given URL in your browser.

Send message to a channel by using  the Channel Unique Name 

 How to get a Channel's Unique Name?

  • Hover over any channel name from Cliq's left pane. 
  • This'll open the channel's preview. Select the 'More info' icon in the channel preview.
  • Navigate to 'Connectors'
  • You'll find the Channel Unique Name highlighted in the API Endpoint URL of the channel. 

Your message structure in JSON 

A simple message needs to be defined as a key-value pair in JSON. The 'text' will contain the message, which you'd like to post. 

For example :

  1. {
  2. "text": "How to post a simple message to a Cliq channel? "
  3. }

Now, to send this JSON by making a standard POST request 

  1. curl -X POST -H "Content-type: application/json" -H "Authorization:Zoho-authtoken <authtoken>" https://cliq.zoho.com/api/v2/channelsbyname/<channel_unique_name>/message -d '{"text":"How to post a simple message to a Cliq Channel?"}'

Sample POST request using cURL:

If the channel uniquename is 'market-stats' and the authtoken is 'abaijd9ie3n9udnuxc92' then your curl command will be
  1. curl -X POST -H "Content-type: application/json" -H "Authorization:Zoho-authtoken abaijd9ie3n9udnuxc92" https://cliq.zoho.com/api/v2/channelsbyname/market-stats/message -d '{"text":"How to post a simple message to a Cliq Channel?"}'

Similarly using wget :

  1. wget --post-data="{'text':'How to post a simple message to a Cliq Channel?'}" --header="Content-type:application/json" --header="Authorization:Zoho-authtoken abaijd9ie3n9udnuxc92" https://cliq.zoho.com/api/v2/channelsbyname/market-stats/message
And finally using Powershell :
  1. Invoke-RestMethod -Uri https://cliq.zoho.com/api/v2/channelsbyname/market-stats/message -Method Post -Headers @{"Authorization" = "Zoho-authtoken abaijd9ie3n9udnuxc92"} -ContentType 'application/json' -Body '{"text" : "How to post a simple message to a Cliq Channel?'"}'
Go on and try posting a message in a channel! After all, its simple. 

Suggestions and discussions are welcome!

Best,
Manasa
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
    • 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
    • Bulk user onboarding for Cliq Channels in a jiffy

      As developers, we frequently switch between coding, debugging, and optimizing tasks. The last thing we want is to be burdened by manual user management. Adding users one by one to a channel is tedious and prone to errors, taking up more time than we could
    • Recent Topics

    • Zoho Mail SMTP IP addresses

      We are using Zoho Mail and needs to whitelist IP for some redirections from your service to another e-mails. You can provide IP address list for Zohomail SMTP servers?
    • Migrate Your Notes from OneNote to Zoho Notebook Today

      Greetings Notebook Users, We’re excited to introduce a powerful new feature that lets you migrate your notes from Microsoft OneNote to Zoho Notebook—making your transition faster and more seamless than ever. ✨ What’s New One-click migration: Easily import
    • Meet Canvas' Grid component: Your easiest way to build responsive record templates

      Visual design can be exciting—until you're knee-deep in the details. Whether it's aligning text boxes to prevent overlaps, fixing negative space, or simply making sure the right data stands out, just ironing out inconsistencies takes a lot of moving parts.
    • Deluge sendmail in Zoho Desk schedule can't send email from a verified email address

      I am trying to add a scheduled action with ZDesk using a Deluge function that sends a weekly email to specific ticket client contacts I've already verified the email address for use in ZDesk, but sendmail won't allow it in its "from:" clause. I've attached
    • Zoho Campaigns - Why do contacts have owners?

      When searching for contacts in Zoho Campaigns I am sometimes caught out when I don't select the filter option "Inactive users". So it appears that I have some contacts missing, until I realise that I need to select that option. Campaigns Support have
    • First day of trying FSM in the field.

      What we found. 1. with out a network connection we were unable to start a service call? 2. if you go to an appointment and then want to add an asset it does not seem possible. 3. disappointed not to be able to actually take a payment from within the app
    • Bigin Android app update: User management

      Hello everyone! In the most recent Bigin Android app update, we have brought in support for the 'Users and Controls' section. You can now manage the users in your organization within the mobile app. There are three tabs in the 'Users and Controls' section:
    • Importing data into Assets

      So we have a module in Zoho CRM called customers equipments. It links to customers modules, accounts (if needed) and products. I made a sample export and created extra fields in zoho fsm assets module. The import fails. Could not find a matching parent
    • Email Integration - Zoho CRM - OAuth and IMAP

      Hello, We are attempting to integrate our Microsoft 365 email with Zoho CRM. We are using the documentation at Email Configuration for IMAP and POP3 (zoho.com) We use Microsoft 365 and per their recommendations (and requirements) for secure email we have
    • One Contact with Multiple Accounts with Portal enabled

      I have a contact that manages different accounts, so he needs to see the invoices of all the companies he manage in Portal but I found it not possible.. any idea? I tried to set different customers with the same email contact with the portal enabled and
    • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

      The address field will be available exclusively for IN DC users. We'll keep you updated on the DC-specific rollout soon. It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition. Managing addresses
    • End Date in Zoho Bookings

      When I give my appointments a 30 minutes time I would expect the software not to even show the End Time.  But it actually makes the user pick an End Time.  Did I just miss a setting?  
    • Choosing a portal option and the "Unified customer portal"?

      I am trialling Zoho to replace various existing systems, one of which is a customer portal. Our portal allows clients to add and edit bookings, complete forms, manage their subscriptions and edit some CRM info. I am trying to understand how I might best
    • Zoho Commerce

      Hi, I have zoho one and use Zoho Books. I am very interested in Zoho Commerce , especially with how all is integrated but have a question. I do not want my store to show prices for customers that are not log in. Is there a way to hide the prices if not
    • email forwarding not working

      Your email forwarding service does not work. I received the confirmation email and completed the confirmation, after that nothing and nothing since no matter what I have tried. Shame as everything else was smooth. I spose it's harder to run one of these web based internet mail services than you guys thought!!! can you fix the email forwarding asap PLEASE!
    • Zoho Desk KB article embedded on another site.

      We embed KB articles from Zoho Desk on another site (our application). When opening the article in a new tab, there is no issue, but if we choose lightbox, we are getting an error "To protect your security, help.ourdomain.com will not allow Firefox to
    • Can a Zoho Sites page be embedded into another website (outside Zoho)

      Hi All, We have a request from a client - they'd like to take one of our information pages created in Zoho Sites and embed it into their own website? I was told through an email with Zoho that this was possible >>Thank you for your patience regarding
    • Support new line in CRM Multiline text field display in Zoho Deluge

      Hi brainstrust, We have a Zoho CRM field which is a Muti Line (Small) field. It has data in it that has a carriage return after each line: When I pull that data in via Deluge, it displays as: I'm hoping a way I can change it from: Freehand : ENABLED Chenille
    • Enable Locations for Expense

      Hi, please enable Locations (ex Branches) for Zoho Expense so that there is consistency between this app and Zoho Books. Thanks in advance.
    • Currency abbreviations

      Hello, Im stuck, and need help. I need the currency fields for example, opportunity value, or total revenue, to be abbreviated, lets say for 1,000 - 1K, 1,000,000 - 1M, and so on, how should I do this?
    • Losing description after merging tickets

      Hello, We merge tickets when they are about the same topic from the same client. It happens sometimes. We recently noticed that after the merger only the description from the master ticket is left in a thread. And the slave-ticket description is erased.
    • in the Zoho Creator i have File Upload field get the file on submission of the form Get the File and upload to Zoho Books

      in the Zoho Creator i have File Upload field get the file on submission of the form Get the File and upload to Zoho Books . how I get the file From zoho creator and upload to Zoho Books . using Api response = invokeUrl [ url: "https://www.zohoapis.com/creator/v2.1/data/hh/l130/report/All_Customer_Payments/"+input.ID
    • Generate a link for Zoho Sign we can copy and use in a separate email

      Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
    • Syntax for URLs in HTML Snippets

      What are some best practices for inserting a URL in an HTML snippet? I've looked at Zoho Help articles on navigation-based and functional-based URLs, but I'm still unclear on how to incorporate them in an HTML snippet. For example, 1. How do I link to
    • Rate Limiting in Zoho Flow (OpenAI API)

      Hi Everyone, We are facing some issues when using Zoho Flow as we have a deluge script running which is making external calls to OpenAI endpoint. Sometimes the response takes more than 30 seconds meaning the script will timeout. We want to implement a
    • Placing a condition before converting the LEAD

      Hi,  I need some assistance with Lead conversion. I need to place certain conditions before allowing the user to convert the lead.  For example: up until the certain status's doesn't equal "green" don't allow to convert lead.  I tried creating this using
    • it is possible to open a widget via deluge script function

      I have one function that is workflow action I call my fucntion I need to call the internal widget it is possible to open or it have to please tell me the solution
    • Creator - Portal Custom Domain

      I will pay $100 in crypto to anyone who can actually get my Creator Custom Domain to function (actually tell me how you got yours to).  Domain verifies, Nothing. I've been fighting it a week, multiple chats to customer service. Clearly I'm doing something wrong.  Some datapoints Domain name itself unimportant, can be a string of numbers.  I need to know what registrars are working for you because GoDaddy does NOT.  Do I need hosting? I've tried both ways and nothing works.  I pushed through Cloudflare
    • Translation support expanded for Modules, Subforms and Related Lists

      Hello Everyone!   The translation feature enables organizations to translate certain values in their CRM interface into different languages. Previously, the only values that could be translated were picklist values and field names. However, we have extended
    • Transitioning to API Credits in Zoho Desk

      At Zoho Desk, we’re always looking for ways to help keep your business operations running smoothly. This includes empowering teams that rely on APIs for essential integrations, functions and extensions. We’ve reimagined how API usage is measured to give
    • steps and options to change Domain DNS/Nameservers settings

      Please share the options or steps to change  Domain DNS/Nameservers settings 
    • Unable to explore desk.zoho.com

      Greetings, I have an account with zoho which already has a survey subscription. I would like to explore desk.zoho.com, but when I visit it while logged in (https://desk.zoho.com/agent?action=CreatePortal) I just get a blank page. I have tried different
    • Employees in Leave Policy exceptions

      In the Leave Policies we should be able to add specific employees to the exception list So it will be like All Employees except A,B,C in the exception list, currently we can only add departments etc
    • Searching customer field

      Hello, When entering a receipt, we select customer information. The customer information is synced with Zoho CRM. However, we can't find the customer information because it searches for words that begin with the entered value. It needs to search for words
    • Transition Criteria Appearing on Blueprint Transitions

      On Monday, Sept. 8th, the Transition criteria started appearing on our Blueprints when users hover over a Transition button. See image. We contacted Zoho support because it's confusing our users (there's really no reason for them to see it), but we haven't
    • Unified task view

      Possible to enable the unified task view in Trident, that is currently available in Mail?
    • How I set default email addresses for Sales Orders and Invoices

      I have customers that have different departments that handle Sales Orders and Invoices. How can i set a default email for Sales Orders that's different than the default email for Invoices? Is there a way I can automate this using the Contact Persons Departments
    • Modular Permission Levels

      We need more modular Permissions per module in Books we have 2 use cases that are creating problems We need per module export permission we have a use case where users should be able to view the sales orders but not export it, but they can export other
    • When dispatched to crew, assigning lead missing

      Hello, For the past two or three weeks, whenever an officer assigns Service Appointment to a team, the lead person is missing from the assigned service list. Therefore, we have to reschedule the SA and then the lead person becomes visible in the assigned
    • Kaizen #157: Flyouts in Client Script

      Hello everyone! Welcome back to another exciting edition of our Kaizen series, where we explore fresh insights and innovative ideas to help you discover more and expand your knowledge!In this post, we'll walk through how to display Flyouts in Client Script
    • Next Page