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

Users APIs

In Zoho CRM, the user is the one who is allowed to access and manage the CRM records. These users can be defined under various profiles and categories such as Administrators, Standard, etc,.

Using the Users APIs, you can retrieve the basic information of your available CRM users. Use the type parameter to get the required list of users. For example, you can set the param type as AdminUsers, to get the list of CRM users with Administrative profile. The detailed explanation of the Users API and the examples are shown below:

Get Users

Purpose

To retrieve the users' data specified in the API request. You can specify the type of users that needs to be retrieved using the Users API. For example, use type=AllUsers, to get the list of all the CRM users available.

Request Details

Request URL

{api-domain}/crm/{version}/users

To get a specific user:
{api-domain}/crm/{version}/users/{user_id}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

If-Modified-Since: Use this header to get the list of recently modified users. Example: 2019-07-25T15:26:49+05:30

Scope

scope=ZohoCRM.users.{operation_type}

Possible operation types

ALL - Full access to users
READ - Get user data

Parameters
  • typestring, optional

    Specify the type of the users you want to retrieve.

    • AllUsers - To list all users in your organization (both active and inactive users).
    • ActiveUsers - To get the list of all the Active Users.
    • DeactiveUsers - To get the list of all the users who were deactivated.
    • ConfirmedUsers - To get the list of all the confirmed users.
    • NotConfirmedUsers - To get the list of all the non-confirmed users.
    • DeletedUsers - To get the list of deleted users.
    • ActiveConfirmedUsers - To get the list of active users who are also confirmed.
    • AdminUsers - To get the list of admin users.
    • ActiveConfirmedAdmins - To get the list of active users with the administrative privileges and are also confirmed.
    • CurrentUser - To get the current CRM user.
  • pageinteger

    To get the list of user records from the respective pages. Default value is 1.

  • per_pageinteger

    To set the number of user records to be retrieved per page. The default and the maximum possible value is 200.

  • idsstring, optional

    Represents the unique ID of the users. You can specify up to 100 user IDs.

Note
  • The page and per_page parameter are used to fetch user records according to their position in the CRM. Let us assume that the user has to fetch 400 user records. The maximum number of user records that one can get for an API call is 200. So, for the user records above the 200th position, they cannot be fetched. By using the page (1 and 2) and per_page (200) parameter, the user can fetch all 400 user records using 2 API calls.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v2.1/users?type=AllUsers"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
3.0.08.0
Copied//Get instance of UsersOperations Class
UsersOperations usersOperations = new UsersOperations();

//Get instance of ParameterMap Class
ParameterMap paramInstance = new ParameterMap();

paramInstance.add(GetUsersParam.TYPE, "ActiveUsers");

paramInstance.add(GetUsersParam.PAGE, 1);

//paramInstance.add(GetUsersParam.PER_PAGE, 1);

HeaderMap headerInstance = new HeaderMap();

OffsetDateTime ifmodifiedsince = OffsetDateTime.of(2020, 01, 02, 10, 00, 01, 00, ZoneOffset.of("+05:30"));

headerInstance.add(GetUsersHeader.IF_MODIFIED_SINCE, ifmodifiedsince);

//Call getUsers method that takes paramInstance and headerInstance as parameters
APIResponse < ResponseHandler > response = usersOperations.getUsers(paramInstance, headerInstance);
Copiedpackage com.zoho.crm.api.sample.restapi.users;
import javax.net.ssl.SSLContext;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
public class UsersAPIs 
{
	private static void getUsers()
	{
		try
		{
			HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
			SSLContext sslContext = SSLContext.getDefault();
			SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
			CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
			URIBuilder uriBuilder = new URIBuilder("https://www.zohoapis.com/crm/v2/users");
			uriBuilder.addParameter("type", "AllUsers");
			uriBuilder.addParameter("page", "1");
			uriBuilder.addParameter("per_page", "2");
			HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
			requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx");
			requestObj.addHeader("If-Modified-Since", "2020-05-15T12:00:00+05:30");
			HttpResponse response = httpclient.execute(requestObj);
			HttpEntity responseEntity = response.getEntity();
			System.out.println("HTTP Status Code : " + response.getStatusLine().getStatusCode());
			if(responseEntity != null)
			{
				Object responseObject = EntityUtils.toString(responseEntity);
				String responseString = responseObject.toString();
				System.out.println(responseString);
			}
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}
	private static void getUser()
	{
		try
		{
			HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
			SSLContext sslContext = SSLContext.getDefault();
			SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
			CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
			URIBuilder uriBuilder = new URIBuilder("https://www.zohoapis.com/crm/v2/users/34770615695004");
			HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
			requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx");
			requestObj.addHeader("If-Modified-Since", "2020-05-15T12:00:00+05:30");
			HttpResponse response = httpclient.execute(requestObj);
			HttpEntity responseEntity = response.getEntity();
			System.out.println("HTTP Status Code : " + response.getStatusLine().getStatusCode());
			if(responseEntity != null)
			{
				Object responseObject = EntityUtils.toString(responseEntity);
				String responseString = responseObject.toString();
				System.out.println(responseString);
			}
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}
	public static void main(String[] args) 
	{
		getUsers();
		getUser();
	}
}
4.0.04.x
Copied//Get instance of UsersOperations Class
$usersOperations = new UsersOperations();
//Get instance of ParameterMap Class
$paramInstance = new ParameterMap();
$paramInstance->add(GetUsersParam::type(), "ActiveUsers");
$paramInstance->add(GetUsersParam::page(), 1);
// $paramInstance->add(GetUsersParam::perPage(), 1);
$headerInstance = new HeaderMap();
$ifmodifiedsince = date_create("2020-07-15T17:58:47+05:30")->setTimezone(new \DateTimeZone(date_default_timezone_get()));
$headerInstance->add(GetUsersHeader::IfModifiedSince(), $ifmodifiedsince);
//Call getUsers method that takes paramInstance as parameter
$response = $usersOperations->getUsers($paramInstance, $headerInstance);


//Get instance of UsersOperations Class
$usersOperations = new UsersOperations();
$headerInstance = new HeaderMap();
$ifmodifiedsince = date_create("2020-07-15T17:58:47+05:30")->setTimezone(new \DateTimeZone(date_default_timezone_get()));
$headerInstance->add(GetUserHeader::IfModifiedSince(), $ifmodifiedsince);
//Call getUser method that takes userId as parameter
$response = $usersOperations->getUser($userId,$headerInstance);
Copied<?php
class GetUsers{
    
    public function execute(){
        $curl_pointer = curl_init();
        
        $curl_options = array();
        $url = "https://www.zohoapis.com/crm/v2/users?";
        $parameters = array();
        $parameters["type"]="AllUsers";
        $parameters["page"]="1";
        $parameters["per_page"]="2";
        foreach ($parameters as $key=>$value){
            $url =$url.$key."=".$value."&";
        }
        $curl_options[CURLOPT_URL] = $url;
        $curl_options[CURLOPT_RETURNTRANSFER] = true;
        $curl_options[CURLOPT_HEADER] = 1;
        $curl_options[CURLOPT_CUSTOMREQUEST] = "GET";
        $headersArray = array();
        
        $headersArray[] = "Authorization". ":" . "Zoho-oauthtoken " . "1000.f62eXXXXX4a302a293.0af14ce31057XXXXXX827beb";
        $headersArray[] = "If-Modified-Since".":"."2020-05-15T12:00:00+05:30";
        $curl_options[CURLOPT_HTTPHEADER]=$headersArray;
        
        curl_setopt_array($curl_pointer, $curl_options);
        
        $result = curl_exec($curl_pointer);
        $responseInfo = curl_getinfo($curl_pointer);
        curl_close($curl_pointer);
        list ($headers, $content) = explode("\r\n\r\n", $result, 2);
        if(strpos($headers," 100 Continue")!==false){
            list( $headers, $content) = explode( "\r\n\r\n", $content , 2);
        }
        $headerArray = (explode("\r\n", $headers, 50));
        $headerMap = array();
        foreach ($headerArray as $key) {
            if (strpos($key, ":") != false) {
                $firstHalf = substr($key, 0, strpos($key, ":"));
                $secondHalf = substr($key, strpos($key, ":") + 1);
                $headerMap[$firstHalf] = trim($secondHalf);
            }
        }
        $jsonResponse = json_decode($content, true);
        if ($jsonResponse == null && $responseInfo['http_code'] != 204) {
            list ($headers, $content) = explode("\r\n\r\n", $content, 2);
            $jsonResponse = json_decode($content, true);
        }
        var_dump($headerMap);
        var_dump($jsonResponse);
        var_dump($responseInfo['http_code']);
        
    }
    
}
(new GetUsers())->execute();
Copieddef get_users(self, user_type):
        try:
            if user_type == 'all':
                resp = ZCRMOrganization.get_instance().get_all_users()
            elif user_type == 'DeactiveUsers':
                resp = ZCRMOrganization.get_instance().get_all_deactive_users()
            elif user_type == 'ActiveUsers':
                resp = ZCRMOrganization.get_instance().get_all_active_users()
            elif user_type == 'ConfirmedUsers':
                resp = ZCRMOrganization.get_instance().get_all_confirmed_users()
            elif user_type == 'NotConfirmedUsers':
                resp = ZCRMOrganization.get_instance().get_all_not_confirmed_users()
            elif user_type == 'DeletedUsers':
                resp = ZCRMOrganization.get_instance().get_all_deleted_users()
            elif user_type == 'ActiveConfirmedUsers':
                resp = ZCRMOrganization.get_instance().get_all_active_confirmed_users()
            elif user_type == 'AdminUsers':
                resp = ZCRMOrganization.get_instance().get_all_admin_users()
            elif user_type == 'ActiveConfirmedAdmins':
                resp = ZCRMOrganization.get_instance().get_all_active_confirmed_admin_users()
            elif user_type == 'CurrentUser':
                resp = ZCRMOrganization.get_instance().get_current_user()
            print (resp.status_code)
            if resp.status_code != 200:
                return
            users = resp.data
            for user in users:
                print ("\n\n")
                print (user.id)
                print (user.name)
                print (user.signature)
                print (user.country)
                crm_role = user.role
                if crm_role is not None:
                    print (crm_role.name)
                    print (crm_role.id)
                customize_info = user.customize_info
                if customize_info is not None:
                    print (customize_info.notes_desc)
                    print (customize_info.is_to_show_right_panel)
                    print (customize_info.is_bc_view)
                    print (customize_info.is_to_show_home)
                    print (customize_info.is_to_show_detail_view)
                    print (customize_info.unpin_recent_item)
                print (user.city)
                print (user.name_format)
                print (user.language)
                print (user.locale)
                print (user.is_personal_account)
                print (user.default_tab_group)
                print (user.street)
                print (user.alias)
                user_theme = user.theme
                if user_theme is not None:
                    print (user_theme.normal_tab_font_color)
                    print (user_theme.normal_tab_background)
                    print (user_theme.selected_tab_font_color)
                    print (user_theme.selected_tab_background)
                print (user.state)
                print (user.country_locale)
                print (user.fax)
                print (user.first_name)
                print (user.email)
                print (user.zip)
                print (user.decimal_separator)
                print (user.website)
                print (user.time_format)
                crm_profile = user.profile
                if crm_profile is not None:
                    print (crm_profile.id)
                    print (crm_profile.name)
                print (user.mobile)
                print (user.last_name)
                print (user.time_zone)
                print (user.zuid)
                print (user.is_confirm)
                print (user.full_name)
                print (user.phone)
                print (user.dob)
                print (user.date_format)
                print (user.status)
        except ZCRMException as ex:
            print (ex.status_code)
            print (ex.error_message)
            print (ex.error_code)
            print (ex.error_details)
            print (ex.error_content)
3.0.08.x
Copied//Get instance of UsersOperations Class
UsersOperations usersOperations = new UsersOperations();
//Get instance of ParameterMap Class
ParameterMap paramInstance = new ParameterMap();
paramInstance.Add(GetUsersParam.TYPE, "ActiveUsers");
paramInstance.Add(GetUsersParam.PAGE, 1);
//paramInstance.Add(GetUsersParam.PER_PAGE, 1);
HeaderMap headerInstance = new HeaderMap();
DateTimeOffset ifmodifiedsince = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local));
headerInstance.Add(GetUsersHeader.IF_MODIFIED_SINCE, ifmodifiedsince);
//Call GetUsers method that takes ParameterMap instance and HeaderMap instance as parameters
APIResponse<ResponseHandler> response = usersOperations.GetUsers(paramInstance, headerInstance);
Copiedusing System;
using System.IO;
using System.Net;
using System.Xml;
using Newtonsoft.Json;
namespace Com.Zoho.Crm.API.Sample.RestAPI.Users
{
    public class UsersAPIs
    {
        public static void GetUsers()
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.zohoapis.com/crm/v2/users?type=AllUsers");
            request.Method = "GET";
            request.Headers["Authorization"] = "Zoho-oauthtoken 1000.avvfdXXXXXXXXXXXXXXsd.65fbaXXXXXXXXdafd";
            string IfModifiedSince = JsonConvert.SerializeObject("2020-05-15T12:00:00+05:30");
            IfModifiedSince = IfModifiedSince.Replace("\\", "");
            IfModifiedSince = IfModifiedSince.Replace("\"", "");
            DateTime dateConversion = XmlConvert.ToDateTime(IfModifiedSince, XmlDateTimeSerializationMode.Utc);
            request.IfModifiedSince = dateConversion;
            request.KeepAlive = true;
            HttpWebResponse response;
            try
            {
                response = (HttpWebResponse)request.GetResponse();
            }
            catch (WebException e)
            {
                if (e.Response == null) { throw; }
                response = (HttpWebResponse)e.Response;
            }
            HttpWebResponse responseEntity = response;
            Console.WriteLine("HTTP Status Code : " + (int)response.StatusCode);
            string responsestring = new StreamReader(responseEntity.GetResponseStream()).ReadToEnd();
            responseEntity.Close();
            Console.WriteLine(responsestring);
        }
        public static void GetUser()
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.zohoapis.com/crm/v2/users/34770615695004");
            request.Method = "GET";
            request.Headers["Authorization"] = "Zoho-oauthtoken 1000.axvbbXXXXXX.65fbaa8a2efa71ba7b27bd4fed4bdafd";
            string IfModifiedSince = JsonConvert.SerializeObject("2020-05-15T12:00:00+05:30");
            IfModifiedSince = IfModifiedSince.Replace("\\", "");
            IfModifiedSince = IfModifiedSince.Replace("\"", "");
            DateTime dateConversion = XmlConvert.ToDateTime(IfModifiedSince, XmlDateTimeSerializationMode.Utc);
            request.IfModifiedSince = dateConversion;
            request.KeepAlive = true;
            HttpWebResponse response;
            try
            {
                response = (HttpWebResponse)request.GetResponse();
            }
            catch (WebException e)
            {
                if (e.Response == null) { throw; }
                response = (HttpWebResponse)e.Response;
            }
            HttpWebResponse responseEntity = response;
            Console.WriteLine("HTTP Status Code : " + (int)response.StatusCode);
            string responsestring = new StreamReader(responseEntity.GetResponseStream()).ReadToEnd();
            responseEntity.Close();
            Console.WriteLine(responsestring);
        }
    }
}
3.0.03.x.x
Copied# Get instance of UsersOperations Class
users_operations = UsersOperations()
# Get instance of ParameterMap Class
param_instance = ParameterMap()
# Possible parameters for Get Users operation
param_instance.add(GetUsersParam.page, 1)
param_instance.add(GetUsersParam.per_page, 200)
param_instance.add(GetUsersParam.type, 'ActiveConfirmedUsers')
# Get instance of ParameterMap Class
header_instance = HeaderMap()
# Possible headers for Get Users operation
header_instance.add(GetUsersHeader.if_modified_since, datetime.fromisoformat('2019-07-07T10:00:00+05:30'))
# Call get_users method that takes ParameterMap instance and HeaderMap instance as parameters
response = users_operations.get_users(param_instance, header_instance)
Copieddef get_users():
    import requests

    url = 'https://www.zohoapis.com/crm/v2/users'

    headers = {
        'Authorization': 'Zoho-oauthtoken 1000.04be928e4a9653ec5995ac4d5ca17c68.0b9e25ccbe5c6afe5f579e860396e268',
        'If-Modified-Since': '2020-05-15T12:00:00+05:30'
    }

    parameters = {
        'type': 'AllUsers',
        'page': 1,
        'per_page': 10
    }

    response = requests.get(url=url, headers=headers, params=parameters)

    if response is not None:
        print("HTTP Status Code : " + str(response.status_code))

        print(response.json())

get_users()
1.0.010.x
Copied//Get instance of UsersOperations Class
let usersOperations = new UsersOperations();
//Get instance of ParameterMap Class
let paramInstance = new ParameterMap();
/* Possible parameters for Get Users operation */
await paramInstance.add(GetUsersParam.TYPE, "ActiveUsers");
await paramInstance.add(GetUsersParam.PAGE, 1);
await paramInstance.add(GetUsersParam.PER_PAGE, 200);
//Get instance of HeaderMap Class
let headerInstance = new HeaderMap();
/* Possible headers for Get Users operation */
await headerInstance.add(GetUsersHeader.IF_MODIFIED_SINCE, new Date("2019-07-07T10:00:00+05:30"));
//Call getUsers method that takes ParameterMap instance and HeaderMap instance as parameters
let response = await usersOperations.getUsers(paramInstance, headerInstance);
Copiedasync function getUsers() {
    const got = require("got");

    let url = 'https://www.zohoapis.com/crm/v2/users'

    let headers = {
        Authorization : "Zoho-oauthtoken 1000.391aXXXXXXXXXXXXXXXXXX622b5.39d3dXXXXXXXXXXXXXXXXX1054",
        'If-Modified-Since' : '2020-05-15T12:00:00+05:30'
    }

    let parameters = {
        type : 'AllUsers',
        page : 1,
        per_page : 10
    }

    let requestDetails = {
        method : "GET",
        headers : headers,
        searchParams : parameters,
        throwHttpErrors : false
    }
    
    let response = await got(url, requestDetails)
    
    if(response != null) {
        console.log(response.statusCode);
        console.log(response.body);
    } 
}
getUsers()

async function getUser() {
    const got = require("got");

    let url = 'https://www.zohoapis.com/crm/v2/users/3409643000000302042'

    let headers = {
        Authorization : "Zoho-oauthtoken 1000.391XXXXXXXXXXXXXXXXXXXXX2b5.39XXXXXXXXXXXXXXXXf4151054",
        'If-Modified-Since' : '2020-05-15T12:00:00+05:30'
    }

    let requestDetails = {
        method : "GET",
        headers : headers,
        throwHttpErrors : false
    }
    
    let response = await got(url, requestDetails)
    
    if(response != null) {
        console.log(response.statusCode);
        console.log(response.body);
    } 
}
getUser()
2.1.0
Copied# Get instance of UsersOperations Class
uo = Users::UsersOperations.new
# Get instance of ParameterMap Class
pm = ParameterMap.new
# Possible parameters for Get Users operation
pm.add(Users::UsersOperations::GetUsersParam.type, 'ActiveUsers')
pm.add(Users::UsersOperations::GetUsersParam.page, 1)
# Get instance of HeaderMap Class
hm = HeaderMap.new
# Possible headers for Get Users operation
# hm.add(Users::UsersOperations::GetUsersHeader.If_modified_since,"")
# Call get_users method that takes ParameterMap instance and HeaderMap instance as parameters
response = uo.get_users(pm, hm)


# Get instance of UsersOperations Class
uo = Users::UsersOperations.new
# Get instance of HeaderMap Class
hm = HeaderMap.new
# hm.add(Users::UsersOperations::GetUsersHeader.If_modified_since,"")
# Call get_user method that takes HeaderMap instance and user_id as parameters
response = uo.get_user(user_id,hm)
Copiedrequire 'net/http'
require 'json'

class GetUsers

    def execute
        parameters ={}
        parameters["type"]="AllUsers";
        parameters["page"]="1";
        parameters["per_page"]="2";
        query_string = parameters.to_a.map { |x| "#{x[0]}=#{x[1]}" }.join('&')
        url = "https://www.zohoapis.com/crm/v2/users";
        url += '?' + query_string if !query_string.nil? && (query_string.strip != '')
        url = URI(url)
        req = Net::HTTP::Get.new(url.request_uri)
        http = Net::HTTP.new(url.host, url.port)
        http.use_ssl = true
        headers={}
        headers["Authorization"]="Zoho-oauthtoken 1000.dfa7XXXXXXXXXXXXXXXXXX84f9665840.c176aeXXXXXXXXXXXX13f3d37a84d"
        headers["If-Modified-Since"]="2020-05-15T12:00:00+05:30";
        headers&.each { |key, value| req.add_field(key, value) }
        response=http.request(req)
        status_code = response.code.to_i
        headers = response.each_header.to_h
        print status_code
        print headers
        unless response.body.nil?
            print  response.body
        end
    end
end
GetUsers.new.execute
Copiedresponse = invokeurl
[
	url: "https://www.zohoapis.com/crm/v2.1/users"
	type: GET
	connection:"crm_oauth_connection"
];
info response;

Show full

Show less

Response JSON Keys

  • country, city, street, state, country_locale, zipstring

    Represents the address of the user.

  • roleJSON object

    Represents the name and ID of the role of the user.

  • localestring

    Represents the user's locale. For instance, 'en_IN'.

  • Modified_ByJSON object

    Represents the name and ID of the user who last modified the user's details.

  • Currencystring

    Represents the user's currency preference.

  • aliasstring

    Represents the alias name of the user.

  • idstring

    Represents the unique ID of the user.

  • fax, email, mobile, phonestring

    Represents the contact details of the user.

  • first_namestring

    Represents the first name of the user.

  • Reporting_ToJSON object

    Represents the name and ID of the user to whom the user reports to.

  • created_timestring

    Represents the date and time at which the user was created.

  • websitestring

    Represents the user's website details.

  • Modified_Timestring

    Represents the date and time at which the user's details were last modified.

  • profileJSON object

    Represents the name and ID of the profile of the user.

  • last_namestring

    Represents the last name of the user.

  • time_zonestring

    Represents the current user's timezone.

  • created_byJSON object

    Represents the name and ID of the user who created the user.

  • zuidstring

    Represents the ZUID of the current user.

  • confirmboolean

    Represents if the user is a confirmed user.
    true: The user is a confirmed user.
    false: The user is not a confirmed user.

  • full_namestring

    Represents the full name of the user in the format specified in "name_format" key.

  • territoriesJSON array

    Each object in the array represents the details the user's territory.

  • dobstring

    Represents the date of birth of the user.

  • date_formatstring

    Represents the date format. For instance, 'MM/dd/yyyy'.

  • time_formatstring

    Represents the time format. For instance, 'hh:mm a'.

  • statusstring

    Represents the status of the user.
    active: The user is active.
    inactive: The user is inactive.

  • signaturestring

    Represents the user's signature.

  • name_formatstring

    Represents the format of the full_name of the user. For instance, 'Salutation,First Name,Last Name'.

  • languagestring

    Represents the language in which the user accesses the CRM. For instance, 'en_US'.

  • microsoftboolean

    Represents if the user is a microsoft user.
    true: The user is a microsoft user.
    false: The user is a microsoft user.

  • personal_accountboolean

    Represents if the user is the only user in the organization.
    true: The user is the only user in the organization.
    false: The user is not the only user in the organization.

  • Isonlineboolean

    Represents if the user is online.
    true: The user is online.
    false: The user is offline.

  • themeinteger

    Represents the details of the theme selected by the user.

Possible Errors

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: Client does not have ZohoCRM.users.READ scope. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to read
    Resolution: The user does not have permission to read user records. Contact your system administrator.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.

  • AUTHORIZATION_FAILEDHTTP 400

    User does not have sufficient privilege to read users
    Resolution: The user does not have the permission to read users. Contact your system administrator.

  • PATTERN_NOT_MATCHEDHTTP 400

    Please check whether the input values are correct
    Resolution: The value specified for the 'type' parameter is incorrect. Refer to parameters section above and specify valid parameter value.

Sample Response

Copied{
  "users": [
    {
      "country": "US",
      "customize_info": {
        "notes_desc": null,
        "show_right_panel": null,
        "bc_view": null,
        "show_home": false,
        "show_detail_view": true,
        "unpin_recent_item": null
      },
      "role": {
        "name": "CEO",
        "id": "4150868000000026005"
      },
      "signature": "<div><a id=\"link\" href=\"https://crm.zoho.com/bookings/ProjectDemo?rid=4b1b5d511ac5628eb3045495192827cc7f2f04de31c657e50f194521b21a27f5gid25837b76288d7b127a3faccd84a936702ba8ac270b0949d1521e82e1a251c1e5\" target=\"_blank\">Patricia Boyle</a></div>",
      "city": null,
      "name_format": "Salutation,First Name,Last Name",
      "language": "en_US",
      "locale": "en_US",
      "microsoft": false,
      "personal_account": false,
      "default_tab_group": "0",
      "Isonline": true,
      "Modified_By": {
        "name": "Patricia Boyle",
        "id": "4150868000000225013"
      },
      "street": null,
      "Currency": "DZD",
      "alias": null,
      "theme": {
        "normal_tab": {
          "font_color": "#FFFFFF",
          "background": "#222222"
        },
        "selected_tab": {
          "font_color": "#FFFFFF",
          "background": "#222222"
        },
        "new_background": null,
        "background": "#F3F0EB",
        "screen": "fixed",
        "type": "default"
      },
      "id": "4150868000000225013",
      "state": "Tamil Nadu",
      "fax": null,
      "country_locale": "US",
      "first_name": "Patricia",
      "email": "patricia.b@zylker.com",
      "Reporting_To": null,
      "decimal_separator": "en_IN",
      "zip": null,
      "created_time": "2019-08-20T11:21:16+05:30",
      "website": "www.zylker.com",
      "Modified_Time": "2020-07-14T18:30:01+05:30",
      "time_format": "hh:mm a",
      "offset": 19800000,
      "profile": {
        "name": "Administrator",
        "id": "4150868000000026011"
      },
      "mobile": null,
      "last_name": "Boyle",
      "time_zone": "Asia/Calcutta",
      "created_by": {
        "name": "Patricia Boyle",
        "id": "4150868000000225013"
      },
      "zuid": "694579958",
      "confirm": true,
      "full_name": "Patricia Boyle",
      "territories": [
        {
          "manager": true,
          "name": "Zylker",
          "id": "4150868000000236307"
        }
      ],
      "phone": null,
      "dob": null,
      "date_format": "MM/dd/yyyy",
      "status": "active"
    },
    {
      "country": null,
      "role": {
        "name": "Sales department Head",
        "id": "4150868000000231921"
      },
      "city": null,
      "language": "en_US",
      "locale": "en_US",
      "microsoft": false,
      "Isonline": false,
      "Modified_By": {
        "name": "Patricia Boyle",
        "id": "4150868000000225013"
      },
      "street": null,
      "Currency": "DZD",
      "alias": null,
      "id": "4150868000000231929",
      "state": null,
      "fax": null,
      "country_locale": "US",
      "first_name": "Jack",
      "email": "jack.s@zylker.com",
      "Reporting_To": null,
      "zip": null,
      "created_time": "2019-08-20T12:39:23+05:30",
      "website": null,
      "Modified_Time": "2020-07-14T18:30:01+05:30",
      "time_format": "hh:mm a",
      "offset": 19800000,
      "profile": {
        "name": "Administrator",
        "id": "4150868000000026011"
      },
      "mobile": null,
      "last_name": "Smith",
      "time_zone": "Asia/Calcutta",
      "created_by": {
        "name": "Patricia Boyle",
        "id": "4150868000000225013"
      },
      "zuid": null,
      "confirm": false,
      "full_name": "Jack Smith",
      "territories": [],
      "phone": null,
      "dob": null,
      "date_format": "MM/dd/yyyy",
      "status": "disabled"
    },
    {
      "country": null,
      "role": {
        "name": "Sales rep",
        "id": "4150868000000231917"
      },
      "city": null,
      "language": "en_US",
      "locale": "en_US",
      "microsoft": false,
      "Isonline": false,
      "Modified_By": {
        "name": "Patricia Boyle",
        "id": "4150868000000225013"
      },
      "street": null,
      "Currency": "DZD",
      "alias": null,
      "id": "4150868000000252644",
      "state": null,
      "fax": null,
      "country_locale": "US",
      "first_name": "Jane",
      "email": "Jane.J@zylker.com",
      "Reporting_To": null,
      "zip": null,
      "created_time": "2019-08-22T15:02:16+05:30",
      "website": null,
      "Modified_Time": "2020-07-14T18:30:01+05:30",
      "time_format": "hh:mm a",
      "offset": 19800000,
      "profile": {
        "name": "Administrator",
        "id": "4150868000000026011"
      },
      "mobile": null,
      "last_name": "J",
      "time_zone": "Asia/Kolkata",
      "created_by": {
        "name": "Patricia Boyle",
        "id": "4150868000000225013"
      },
      "zuid": null,
      "confirm": false,
      "full_name": "Jane J",
      "territories": [
        {
          "manager": false,
          "name": "Sample Territory",
          "id": "4150868000000264087"
        }
      ],
      "phone": null,
      "dob": null,
      "date_format": "MM/dd/yyyy",
      "status": "disabled"
    }
  ],
  "info": {
    "per_page": 200,
    "count": 3,
    "page": 1,
    "more_records": false
  }
}