Skip to content

OAuth 2.0

The ManageEngine SerivceDesk Plus MSP Cloud APIs use OAuth 2.0 for authentication. This page gives you an overview of the authentication process. For complete details on OAuth 2.0 flows, registration, token management, and more, refer to Zoho OAuth 2.0 documentation.


How OAuth 2.0 works

To access SerivceDesk Plus MSP Cloud APIs, your application needs an access token obtained through one of the

OAuth 2.0 flows. At a high level, the steps are:

  • Register your application in the Zoho API console.

  • Get consent from user to access their data and obtain an access token.

  • Call SerivceDesk Plus Cloud APIs using the access token.


Token Expiry

Access tokens expire periodically. The expiry duration is mentioned as expires_in (seconds) in the access token response. To maintain uninterrupted access, you can request for an optional refresh token, store it, and use it to generate new access tokens as needed.


Different OAuth flows for different app types

Zoho supports OAuth flows for different application types (server-based, client-based, mobile & desktop-based, limited input devices, and self client). You can choose the flow that matches your application.


Multi DC support

Zoho operates data centres in multiple regions. If your application serves users across regions, you must enable Multi DC support in the API console and use region-specific endpoints for both OAuth and Product API calls.

See detailed OAuth 2.0 workflow


Scopes

ManageEngine ServiceDesk Plus MSP Cloud APIs use selected scopes, which control the type of resource that the client application can access. Tokens are usually created with various scopes to ensure improved security.

For example, you can generate a scope to create or view a service request, or to view metadata and so on. Scopes contain three parameters — service name, scope name, and operation type. The format to define a scope is

scope=SDPOnDemand.scope_name.operation_type


Example: scope=SDPOnDemand.projects.ALL

Here, SDPOnDemand is the service name, projects is the scope name, and ALL is the operation type.


List of Available Scopes

Group/Module scope provides complete access to all functions the user can perform on the particular module.

For instance, a group scope can allow a user to read, create, update, and delete records in a module.

Customer Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.setup.ALL To access Admin module related all APIs
CREATE SDPOnDemand.setup.CREATE To create Admin module related records
READ SDPOnDemand.setup.READ To read Admin module related records
UPDATE SDPOnDemand.setup.UPDATE To update Admin module related records
DELETE SDPOnDemand.setup.DELETE To delete Admin module related records

Requests Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.requests.ALL To access Requests module related all APIs
CREATE SDPOnDemand.requests.CREATE To create Requests module related records
READ SDPOnDemand.requests.READ To read Requests module related records
UPDATE SDPOnDemand.requests.UPDATE To update Requests module related records
DELETE SDPOnDemand.requests.DELETE To delete Requests module related records

Problems Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.problems.ALL To access Problems module related all APIs
CREATE SDPOnDemand.problems.CREATE To create Problems module related records
READ SDPOnDemand.problems.READ To read Problems module related records
UPDATE SDPOnDemand.problems.UPDATE To update Problems module related records
DELETE SDPOnDemand.problems.DELETE To delete Problems module related records

Changes Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.changes.ALL To access Changes module related all APIs
CREATE SDPOnDemand.changes.CREATE To create Changes module related records
READ SDPOnDemand.changes.READ To read Changes module related records
UPDATE SDPOnDemand.changes.UPDATE To update Changes module related records
DELETE SDPOnDemand.changes.DELETE To delete Changes module related records

Projects Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.projects.ALL To access Projects module related all APIs
CREATE SDPOnDemand.projects.CREATE To create Projects module related records
READ SDPOnDemand.projects.READ To read Projects module related records
UPDATE SDPOnDemand.projects.UPDATE To update Projects module related records
DELETE SDPOnDemand.projects.DELETE To delete Projects module related records

Releases Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.releases.ALL To access Releases module related all APIs
CREATE SDPOnDemand.releases.CREATE To create Releases module related records
READ SDPOnDemand.releases.READ To read Releases module related records
UPDATE SDPOnDemand.releases.UPDATE To update Releases module related records
DELETE SDPOnDemand.releases.DELETE To delete Releases module related records

Assets Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.assets.ALL To access Asset module related all APIs
CREATE SDPOnDemand.assets.CREATE To create Asset module related records
READ SDPOnDemand.assets.READ To read Asset module related records
UPDATE SDPOnDemand.assets.UPDATE To update Asset module related records
DELETE SDPOnDemand.assets.DELETE To delete Asset module related records

CMDB Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.cmdb.ALL To access CMDB module related all APIs
CREATE SDPOnDemand.cmdb.CREATE To create CMDB module related records
READ SDPOnDemand.cmdb.READ To read CMDB module related records
UPDATE SDPOnDemand.cmdb.UPDATE To update CMDB module related records
DELETE SDPOnDemand.cmdb.DELETE To delete CMDB module related records

Contracts Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.contracts.ALL To access Contracts module related all APIs
CREATE SDPOnDemand.contracts.CREATE To create Contracts module related records
READ SDPOnDemand.contracts.READ To read Contracts module related records
UPDATE SDPOnDemand.contracts.UPDATE To update Contracts module related records
DELETE SDPOnDemand.contracts.DELETE To delete Contracts module related records

Purchases Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.purchases.ALL To access Purchases module related all APIs
CREATE SDPOnDemand.purchases.CREATE To create Purchases module related records
READ SDPOnDemand.purchases.READ To read Purchases module related records
UPDATE SDPOnDemand.purchases.UPDATE To update Purchases module related records
DELETE SDPOnDemand.purchases.DELETE To delete Purchases module related records

Custom Module Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.custommodule.ALL To access Custom module instance all APIs
CREATE SDPOnDemand.custommodule.CREATE To create Custom module instance records
READ SDPOnDemand.custommodule.READ To read Custom module instance records
UPDATE SDPOnDemand.custommodule.UPDATE To update Custom module instance records
DELETE SDPOnDemand.custommodule.DELETE To delete Custom module instance records

Solutions Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.solutions.ALL To access Solutions module related all APIs
CREATE SDPOnDemand.solutions.CREATE To create Solutions module related records
READ SDPOnDemand.solutions.READ To read Solutions module related records
UPDATE SDPOnDemand.solutions.UPDATE To update Solutions module related records
DELETE SDPOnDemand.solutions.DELETE To delete Solutions module related records

Setup Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.setup.ALL To access Admin module related all APIs
CREATE SDPOnDemand.setup.CREATE To create Admin module related records
READ SDPOnDemand.setup.READ To read Admin module related records
UPDATE SDPOnDemand.setup.UPDATE To update Admin module related records
DELETE SDPOnDemand.setup.DELETE To delete Admin module related records

General Scopes

Operation Type Scope Example Description
ALL SDPOnDemand.general.ALL To access all General APIs
CREATE SDPOnDemand.general.CREATE To create General records
READ SDPOnDemand.general.READ To read General records
UPDATE SDPOnDemand.general.UPDATE To update General records
DELETE SDPOnDemand.general.DELETE To delete General records

One or more scopes can also be mentioned as comma separated in scope.

Example:

scope=SDPOnDemand.requests.ALL,SDPOnDemand.projects.READ,SDPOnDemand.setup.READ,SDPOnDemand.setup.CREATE

Here, Request, Project and Admin modules are included in scope. So this will provide complete access for request module and read access for project module and read and create access for Admin module.

For more details about scope format, see OAuth Scopes.​ ​


Making API calls with access token

To authenticate your API calls, include the access token in the Authorization header of every API request.

Supported Format

Authorization: Zoho-oauthtoken <space> {access-token-value}


Example

curl -X GET “https://sdpondemand.manageengine.com/api/v3/requests” \ -H “Authorization: Zoho-oauthtoken 1000.abc123def456…”

API endpoints by data center

When making API calls, you must use the base URL corresponding to your user’s data center. The correct URL is returned as api_domain in the access token response.

Data Center API Base URL
United States (US) https://sdpondemand.manageengine.com
(Example for get request list is: https://sdpondemand.manageengine.com/api/v3/requests)
European Union (EU) https://sdpondemand.manageengine.eu
(Example for get request list is: https://sdpondemand.manageengine.eu/api/v3/requests)
India (IN) https://sdpondemand.manageengine.in
(Example for get request list is: https://sdpondemand.manageengine.in/api/v3/requests)
Australia (AU) https://servicedeskplus.net.au
(Example for get request list is: https://servicedeskplus.net.au/api/v3/requests)
Japan (JP) https://servicedeskplus.jp
(Example for get request list is: https://servicedeskplus.jp/api/v3/requests)
Canada (CA) https://servicedeskplus.ca
(Example for get request list is: https://servicedeskplus.ca/api/v3/requests)
Saudi Arabia (SA) https://servicedeskplus.sa/
(Example for get request list is: https://servicedeskplus.sa/api/v3/requests)
United Kingdom (UK) https://servicedeskplus.uk
(Example for get request list is: https://servicedeskplus.uk/api/v3/requests)
China (CN) https://servicedeskplus.cn
(Example for get request list is: https://servicedeskplus.cn/api/v3/requests)
United Arab Emirates (AE) https://servicedeskplus.ae
(Example for get request list is: https://servicedeskplus.ae/api/v3/requests)

Important

Never hardcode a single region’s URL. Always use the api_domain from the access token response

For more details about Data Centres, see Multi-DC Support.​


API Example

To access the ManageEngine ServiceDesk Plus Cloud’s API, you need to send the ‘Authorization’ & ‘Accept’ headers with your request.

GET LIST Request

 https://sdpondemand.manageengine.com/api/v3/requests

Important

URI components for input_data needs to be encoded in Request Parameter.

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests
      -X GET 
      -H "Accept: application/vnd.manageengine.sdp.v3+json" 
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx" 
      -H "Content-Type: application/x-www-form-urlencoded"
      --data-urlencode input_data = 
 '{
  "list_info": {
    "search_criteria": {
      "field": "created_time.value",
      "condition": "greater than",
      "value": "1488451440000"
    }
  }
 }'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "list_info": {
    "search_criteria": {
      "field": "created_time.value",
      "condition": "greater than",
      "value": "1488451440000"
    }
  }
 };
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: GET
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests"
$headers = @{"Accept"="application/vnd.manageengine.sdp.v3+json";
 "Authorization"="Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"}
$input_data = @'{
  "list_info": {
    "search_criteria": {
      "field": "created_time.value",
      "condition": "greater than",
      "value": "1488451440000"
    }
  }
 }'@
$data = @{ 'input_data' = $input_data}          
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers -ContentType "application/x-www-form-urlencoded"
$response
#Python version - 3.8
#This script requires requests module installed in python.
import requests
import json
url = "<service domain|custom domain>/app/<portal>/api/v3/requests"
headers ={"Content-Type": "application/x-www-form-urlencoded",
"Accept":"application/vnd.manageengine.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"}
list_info ={"list_info": {"search_criteria": {"field": "created_time.value","condition": "greater than","value": "1488451440000"}}}
params = {"input_data" :json.dumps(list_info)}
response = requests.get(url,headers=headers,params=params,verify=False)
print(response.text)
    {
        "response_status": [{
            "status_code": 2000,
            "status": "success"
        }],
        "list_info": {
            "search_criteria": {
                "field": "created_time.value",
                "condition": "greater than",
                "value": "1488451440000"
            }
        },
        "requests": [{
            "subject": "Need an External Monitor",
            "id": "1928813039376938",
            "group": {
                "site": "Custom Site",
                "deleted": false,
                "name": "Hardware Problems",
                "id": "2173326968342823"
            },
            "requester": {
                "email_id": "lincoln@zmail.com",
                "is_technician": false,
                "sms_mail": "linc123@xys_sms.co",
                "phone": "test-phone",
                "name": "Lincoln",
                "mobile": "test-mobile",
                "id": "1650986973829395",
                "photo_url": "https://contacts.zoho.com/file?sample",
                "is_vip_user": false
            },
            "created_time": {
                "display_value": "Nov 10, 2016 11:44 AM",
                "value": "1478758440000"
            },
            "on_behalf_of": {
                "email_id": "lincoln@zmail.com",
                "is_technician": false,
                "sms_mail": "linc123@xys_sms.co",
                "phone": "test-phone",
                "name": "Lincoln",
                "mobile": "test-mobile",
                "id": "2437969736081554",
                "photo_url": "https://contacts.zoho.com/file?sample",
                "is_vip_user": false
            },
            "update_reason": "The request is updated for this reason",
            "has_notes": false,
            "status": {
                "in_progress": false,
                "internal_name": "test-internal_name",
                "stop_timer": false,
                "color": "#ffffff",
                "name": "Open",
                "id": "1846100140604337"
            },
            "template": {
                "is_service_template": false,
                "name": "Default Template",
                "id": "1908186594112074"
            },
            "display_id": "39",
            "is_service_request": false,
            "technician": {
                "email_id": "test@test.com",
                "cost_per_hour": 1343434.4333,
                "phone": "test-phone",
                "name": "Charles",
                "mobile": "test-mobile",
                "id": "1537931074919595",
                "photo_url": "https://contacts.zoho.com/file?sample",
                "sms_mail_id": "test-sms_mail_id"
            },
            "due_by_time": {
                "display_value": "Nov 10, 2016 11:44 AM",
                "value": "1478758440000"
            },
            "customer": {
                "name": "Cutomer 1",
                "id": "2000000041633",
                "is_msp": false,
                "deleted_time": null
            }
        }]
    }