Get practical tips to improve your customer service strategy at Zoho CX Workshop.

Register now!
Skip to product menu
close
  • Sales
    Press Space or Enter to display list of options
EXPLORE ALL PRODUCTS

Sales

 
CRM

Comprehensive CRM platform for customer-facing teams.

CRM
 
Bigin

Simple CRM for small businesses moving from spreadsheets.

Bigin
 
Forms

Build online forms for every business need.

Forms
 
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
 
Bookings

Appointment scheduling app for consultations with customers.

Bookings
 
Sign

Digital signature app for businesses.

Sign
 
RouteIQ

Comprehensive sales map visualization and optimal route planning solution.

RouteIQ
 
Thrive

Complete loyalty and affiliate management platform.

Thrive
 
Voice

Cloud Contact Center Software for businesses.

Voice
 
Suites
CRM Plus

Unified platform to deliver top-notch customer experience.

CRM Plus

Marketing

 
Social

All-in-one social media management software.

Social
 
Campaigns

Create, send, and track targeted email campaigns that drive sales.

Campaigns
 
Forms

Build online forms for every business need.

Forms
 
Survey

Design surveys to reach and interact with your audience.

Survey
 
Sites

Online website builder with extensive customisation options.

Sites
 
PageSense

Website conversion optimization and personalisation platform.

PageSense
 
Backstage

End-to-end event management software.

Backstage
 
Webinar

Webinar platform for webcasting online webinars.

Webinar
 
Marketing Automation

All-in-one marketing automation software.

Marketing Automation
 
LandingPage

Smart landing page builder to increase conversion rates

LandingPage
 
Publish

Manage all your local business listings on a single platform.

Publish
 
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
 
Sign

Digital signature app for businesses.

Sign
 
Thrive

Complete loyalty and affiliate management platform.

Thrive
 
Voice

Cloud Contact Center Software for businesses.

Voice
 
NEW
LeadChain

Sync, manage, and convert leads across channels seamlessly.

LeadChain
 
NEW
CommunitySpaces

Online community platform for individuals and businesses to grow their network and brand.

CommunitySpaces
 
Suites
Marketing Plus

Unified marketing platform for marketing teams.

Marketing Plus

Commerce and POS

 
Commerce

eCommerce platform to manage and market your online store.

Commerce

Service

 
Desk

Helpdesk software to deliver great customer support.

Desk
 
Assist

Remote support and unattended remote access software.

Assist
 
Lens

Interactive remote assistance software with augmented reality.

Lens
 
FSM

End-to-end field service management platform for service businesses.

FSM
 
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
 
Voice

Cloud Contact Center Software for businesses.

Voice
 
Solo

The all-in-one toolkit for solopreneurs.

Solo
 
Bookings

Appointment scheduling app for consultations with customers.

Bookings
 
Suites
Service Plus

Unified platform for customer service and support teams.

Service Plus

Finance

 
Books

Powerful accounting platform for growing businesses.

Books
 
FREE
Invoice

100% Free invoicing solution.

Invoice
 
Expense

Effortless expense reporting platform.

Expense
 
Inventory

Powerful stock management and inventory control software.

Inventory
 
Billing

End-to-end billing solution for your business.

Billing
 
Checkout

Collect payments online with custom branded pages.

Checkout
 
NEW
Payroll

Payroll software with automated tax payments and filing.

Payroll
 
Solo

The all-in-one toolkit for solopreneurs.

Solo
 
Practice

Practice management software for accounting firms.

Practice
 
Sign

Digital signature app for businesses.

Sign
 
Commerce

eCommerce platform to manage and market your online store.

Commerce
 
Suites
Finance Plus

All-in-one suite to manage your operations and finances.

Finance Plus

Email and Collaboration

 
Mail

Secure email service for teams of all sizes.

Mail
 
Meeting

Online meeting software for all your video conferencing & webinar needs.

Meeting
 
Writer

Word processor for focused writing and discussions.

Writer
 
Sheet

Spreadsheet software for collaborative teams.

Sheet
 
Show

Create, edit, and share slides with a sleek presentation app.

Show
 
Notebook

Beautiful home for all your notes.

Notebook
 
Cliq

Stay in touch with teams no matter where you are.

Cliq
 
Connect

Employee experience platform to communicate, engage, and build positive employee relations.

Connect
 
Bookings

Appointment scheduling app for consultations with customers.

Bookings
 
TeamInbox

Shared inboxes for teams.

TeamInbox
 
WorkDrive

Online file management for teams.

WorkDrive
 
Sign

Digital signature app for businesses.

Sign
 
Office Suite

Powerful collaborative work platform for teams.

Office Suite
 
Office Integrator

Built in document editors for web apps.

Office Integrator
 
ZeptoMail

Secure and reliable transactional email sending service.

ZeptoMail
 
Calendar

Online business calendar to manage events and schedule appointments.

Calendar
 
Learn

Knowledge and learning management platform.

Learn
 
Voice

Cloud Contact Center Software for businesses.

Voice
 
ToDo

Collaborative task management for individuals and teams.

ToDo
 
Tables

Work management tool to connect people, processes, and information.

Tables
 
FREE
PDF Editor

Collaborative online PDF editing tool.

PDF Editor
 
Suites
Workplace

Application suite built to improve team productivity and collaboration.

Workplace

Human Resources

 
People

Organize, automate, and simplify your HR processes.

People
 
Recruit

Intuitive recruiting platform built to provide hiring solutions.

Recruit
 
Expense

Effortless expense reporting platform.

Expense
 
Workerly

Manage temporary staffing with an employee scheduling solution.

Workerly
 
NEW
Payroll

Payroll software with automated tax payments and filing.

Payroll
 
Shifts

Employee scheduling and time tracking app.

Shifts
 
Sign

Digital signature app for businesses.

Sign
 
Suites
People Plus

Comprehensive HR platform for seamless employee experiences.

People Plus

Security and IT Management

 
Creator

Build custom apps to simplify business processes.

Creator
 
Directory

Workforce identity and access management solution for cloud businesses.

Directory
 
FREE
OneAuth

Secure multi-factor authenticator (MFA) for all your online accounts.

OneAuth
 
Vault

Online password manager for teams.

Vault
 
Catalyst

Pro-code platform to build and deploy your apps.

Catalyst
 
Toolkit

Complete resource for any admin-related lookup queries.

Toolkit
 
Lens

Interactive remote assistance software with augmented reality.

Lens
 
Assist

Remote support and unattended remote access software.

Assist
 
QEngine

Test automation software to build, manage, execute, and report testcases.

QEngine
 
NEW
RPA

Automate manual, tedious, and repetitive tasks easily.

RPA

BI and Analytics

 
Analytics

Modern self-service BI and analytics platform.

Analytics
 
Embedded BI

Embedded analytics and white label BI solutions, tailored for your needs.

Embedded BI
 
DataPrep

AI-powered data preparation service for your data-driven organization.

DataPrep
 
NEW
IoT

Harnessing IoT analytics for real-time operational intelligence.

IoT

Project Management

 
Projects

Manage, track, and collaborate on projects with teams.

Projects
 
Sprints

Planning and tracking tool for scrum teams.

Sprints
 
BugTracker

Automatic bug tracking software for managing bugs.

BugTracker
 
Solo

The all-in-one toolkit for solopreneurs.

Solo

Developer Platforms

 
Creator

Build custom apps to simplify business processes.

Creator
 
Flow

Automate business workflows by creating smart integrations.

Flow
 
Catalyst

Pro-code platform to build and deploy your apps.

Catalyst
 
Office Integrator

Built in document editors for web apps.

Office Integrator
 
ZeptoMail

Secure and reliable transactional email sending service.

ZeptoMail
 
QEngine

Test automation software to build, manage, execute, and report testcases.

QEngine
 
Tables

Work management tool to connect people, processes, and information.

Tables
 
NEW
RPA

Automate manual, tedious, and repetitive tasks easily.

RPA
 
NEW
Apptics

Application analytics for all apps.

Apptics
 
Embedded BI

Embedded analytics and white label BI solutions, tailored for your needs.

Embedded BI
 
NEW
IoT

Build, deploy, and scale IoT solutions for connected businesses.

IoT
 
DataPrep

AI-powered data preparation service for your data-driven organization.

DataPrep

IoT

 
NEW
IoT

Low-code IoT platform and solutions for connected businesses.

IoT

Search Result

 
CRM Plus

Unified platform to deliver top-notch customer experience.

Try now
CRM Plus
 
Service Plus

Unified platform for customer service and support teams.

Try now
Service Plus
 
Finance Plus

All-in-one suite to manage your operations and finances.

Try now
Finance Plus
 
People Plus

Comprehensive HR platform for seamless employee experiences.

Try now
People Plus
 
Workplace

Application suite built to improve team productivity and collaboration.

Try now
Workplace
 
Marketing Plus

Unified marketing platform for marketing teams.

Try now
Marketing Plus
 
All-in-one suite

Zoho One

The Operating System for Business

Run your entire business on Zoho with our unified cloud software, designed to help you break down silos between departments and increase organizational efficiency.

TRY ZOHO ONE
Zoho One
Zoho Marketplace

With over 2000 ready-to-use extensions across 40+ categories, connect your favorite business tools with the Zoho products you already use.

EXPLORE MARKETPLACE
Marketplace
Skip to main content

Request Method

Request method helps you securely call third party APIs from widgets. Using this API, you can prevent malicious users from trying to gain access to critical information, such as user credentials and API keys. The Request method calls are routed through proxies, hence it also supports Cross-origin Resource Sharing (CORS). Request method supports GETPOST, DELETE, and HTTP methods. You can also upload files using Request method.

 

Parameters

The argument of this API must be passed as an object containing the following parameters.

ParameterDescription
url *URL of the third-party API.
The domain of the requestURL must be mentioned under the whiteListedDomain key in the plugin-manifest.
Eg. "whiteListedDomain": ["https://www.example.com"].
type *

HTTP methods supported: - GET, POST, DELETE,PUT and PATCH.

Note: If the request involves a patch method, the value of type must be POST.

headers *HTTP headers supported to be passed in the request.
postBody *Represents entity body. This parameter, which must be passed as an object, is required for PATCH, POST, and PUT requests.If you are making a GET call, make the postBody as empty.
dataKey that contains the data to be appended as queryParams to the URL.
connectionLinkNameKey for authenticating the third-party domain. The value of this parameter must be the same as the one passed in the connectionLinkName value in the plugin manifest.
responseTypeKey that specifies the type of data the response must contain. Values allowed are: arraybuffer, blob, document, json, text, ms-stream, and empty string. If responseType is mentioned in the payload, the postBody and fileObj will not be considered.
fileObjKey that helps upload file objects to the third-party domain. The value of this key must be an array of objects containing the key and file parameters.

 

Sample Request

Copiedvar requestObj = {
             url: "https://api.open-meteo.com/v1/forecast",
             headers: {},
             postBody: {},
             type: 'GET',
             data: {
                 "latitude": "28.65",
                 "longitude": "77.23",
                 "hourly": "precipitation,rain",
                 "daily": "weathercode",
                 "timezone": "auto",
                 "forecast_days": "1"
             }
         }
         ZOHODESK.request(requestObj).then(res => {
             // Implement your logic here
            let weatherdata=JSON.parse(res).response;
            console.log(weatherdata);
         }, (error) => {
             // Implement your logic here
             console.log(error);
         })

Show full

Show less

Sample response

Copied{
  "latitude": 28.625,
  "longitude": 77.25,
  "generationtime_ms": 1.1839866638183594,
  "utc_offset_seconds": 19800,
  "timezone": "Asia/Kolkata",
  "timezone_abbreviation": "IST",
  "elevation": 227.0,
  "hourly_units": {
    "time": "iso8601",
    "precipitation": "mm",
    "rain": "mm"
  },
  "hourly": {
    "time": [
      "2023-06-15T00:00",
      "2023-06-15T01:00",
      "2023-06-15T02:00",
      "2023-06-15T03:00",
      "2023-06-15T04:00",
      "2023-06-15T05:00",
      "2023-06-15T06:00",
      "2023-06-15T07:00",
      "2023-06-15T08:00",
      "2023-06-15T09:00",
      "2023-06-15T10:00",
      "2023-06-15T11:00",
      "2023-06-15T12:00",
      "2023-06-15T13:00",
      "2023-06-15T14:00",
      "2023-06-15T15:00",
      "2023-06-15T16:00",
      "2023-06-15T17:00",
      "2023-06-15T18:00",
      "2023-06-15T19:00",
      "2023-06-15T20:00",
      "2023-06-15T21:00",
      "2023-06-15T22:00",
      "2023-06-15T23:00"
    ],
    "precipitation": [
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.20,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00
    ],
    "rain": [
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00,
      0.00
    ]
  },
  "daily_units": {
    "time": "iso8601",
    "weathercode": "wmo code"
  },
  "daily": {
    "time": [
      "2023-06-15"
    ],
    "weathercode": [
      3
    ]
  }
}

Show full

Show less

 


Calling authenticated APIs using Request Method

We can use connections for calling authenticated APIs using Request method. These connections help to fetch data from the third-party service, by including the connectionLinkName key in the Request Method. The authorisation is automatically handled by ZOHO if the connectionLinkName is given.

 

Sample Request

CopiedZOHODESK.get("portal.id").then((orgResponse)=>{
    let orgID = orgResponse["portal.id"];
    
    var requestObj = {
        url: "https://desk.zoho.com/api/v1/tickets",
        headers: {
            'Content-Type': 'application/json',
        },
        postBody: {},
        type: 'GET',
        data: { 'orgId': orgID },
        connectionLinkName: "deskconnection"
     }
     ZOHODESK.request(requestObj).then(res => {
        // Implement your logic here
        console.log(res);
     }, (error) => {
        // Implement your logic here
        console.log(error);
     })
})

Show full

Show less



Uploading files using Request Method

Request Methods support the file upload. For uploading a file you need to specify the file in the FileObj whose value must be an array of objects containing the key and file parameters.


Note:

Change the content-type in the headers param based on the type of file you upload.

  • Use "multipart/form-data" type for multi part files
  • Use "application/octet-stream" if the file is a byte-stream.

Sample Request

Copieddocument.getElementById("uploadButton").addEventListener("click", () => {
	let fileContent = document.getElementById("fileInput").files[0];
	console.log(fileContent);
	let sampleRequestObj = {
		url: "https://webhook.site/02dca682-3ad2-4bfc-9363-dc5cb1110132",
		type: "POST",
		data: {
		},
		postBody: {},
		headers: {
			"Content-Type": "application/json"
		},
		fileObj: [{ "key": "file1", "file": fileContent }]
	}

	ZOHODESK.request(sampleRequestObj).then(res => {
		// Implement your logic here
		console.log(res);
	}, (error) => {
		// Implement your logic here
		console.log(error);
	})
})

Show full

Show less

 

Using Config params in Request method

You can make use of placeholders in request method to replace config param values that are received as input from users during installation. To make use of config params, you need to include the config param's name inside double curly braces. Placeholders are supported for the url, data, postbody, and headers parameters.

For example: {{youtubeChannelName}}.

 

Sample Request

Copiedlet sampleRequestObj = {
		url: "https://www.example.com/test/{{RequestId}}", //RequestId is a config param
		type: "POST",
		data: {},
	},
	postBody: {
		"layout_id": "{{layoutId}}",
		"title": "asdf"
	}, //layoutId is a config param
	headers: {
		"Content-Type": "application/json",
	},
	connectionLinkName: "exampleConnection",
}
ZOHODESK.request(sampleRequestObj).then(res => {
	// Implement your logic here
	console.log(res);
}, (error) => {
	// Implement your logic here
	console.log(error);
})

Show full

Show less

 

Calling Function inside Sigma using Request method

Request method also supports placeholders for certain values required for invoking the functions inside sigma. To know how functions are invoked from widget, refer this section.

Placeholders supported by Request method

PlaceholderDescription
{{<configParamName>}}used to replace value of the config param.
Eg: {{youtubeChannelName}}
{{installationId}}used to replace installationId of the extension
{{enCapApiKey}}used when calling function inside Sigma from Widgets.
{{securityContext}}used for security purposes, for authentication purposes
{{extensionVersion}}helps to replace extensions version.
{{resourcetype.resourcename.id}}used to replace extension resources id.
Eg: {{fields.examplefield.id}}
{{resourcetype.resourcename.apiName}}helps to replace apiName of the extension resource
Eg: {{fields.examplefield.apiName}}
{{sigmaInstallId}}used when calling function inside Sigma from widgets.

 

Limitations

  1. You can make a maximum of 50 requests per minute.
  2. You can upload a maximum of 3 files per minute.

 

Errors From Request Method

Request method does some validations before executing the given URL. Hence, Request method throws two kinds of errors, such as errors thrown by the URL called and the errors that are thrown by the Request method. For the errors that are thrown by the Request method, appropriate response code and message will be given in the response of the Request method.Some of the common errors while using request method are given below.

Error MessageReason
{errMsg: 'No entry found in plugin-manifest whiteListedDomains for requested URL'}If the URL's Domain is not present in the whiteListedDomain of the plugin-manifest.
ProcessGetRequest : Error => TypeError: e.postBody is undefinedThis error will be shown in console if PostBody is not specified in the Request Object.
{\"statusMessage\":\"com.zoho.dre.exception.DREException: Invalid connectionName or Id\",\"status\":\"false\"}Connection is not connected or the provided connection in the connectionLinkName is not present.
{\"statusMessage\":\"Error due to - 'Internal Exception'\",\"status\":\"false\"}Key is not mentioned in FileObj while uploading a file.