0% found this document useful (0 votes)
2 views

ZOHOAPIcallout Logic

The document outlines the procedure for making API callouts to Zoho, including steps for generating an API token and refreshing it. It provides specific methods and example results for obtaining access tokens and retrieving ticket data from the Zoho Desk API. The final callout example demonstrates how to access ticket information using the generated token.

Uploaded by

siddharth4995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

ZOHOAPIcallout Logic

The document outlines the procedure for making API callouts to Zoho, including steps for generating an API token and refreshing it. It provides specific methods and example results for obtaining access tokens and retrieving ticket data from the Zoho Desk API. The final callout example demonstrates how to access ticket information using the generated token.

Uploaded by

siddharth4995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ZOHO API Callout procedure

1.API token generation

Method : POST

https://accounts.zoho.com/oauth/v2/token?
grant_type=authorization_code&client_id=1000.2X2VT4XJWPR6S7ZLK4VXQKEM9A
TVES&client_secret=b101cd919c82e3b851fd75bf0567d6434c930dce42&code=100
0.cf6f86bd354539c0d6f40df914aedb9c.39fdf5d031935f6484fa98c012dead42

Result :
{
"access_token":
"1000.8936804acea664ccec1d4c06a5cea21d.fc5e6dcbb6e8735f84a3ff3
f0e8f1891",
"refresh_token":
"1000.27de9621848a262e200cf2b74a367ab3.022096b73b7c43298f6e917
55ae9638a",
"scope": "Desk.tickets.ALL Desk.tickets.READ
Desk.tickets.WRITE Desk.tickets.CREATE Desk.settings.ALL
Desk.tasks.READ",
"api_domain": "https://www.zohoapis.com",
"token_type": "Bearer",
"expires_in": 3600
}

1
2.API refresh token

Method: Post

Curl:
https://accounts.zoho.com/oauth/v2/token?
refresh_token=1000.27de9621848a262e200cf2b74a367ab3.022096b73b7c43298f6e91755
ae9638a&client_id=1000.2X2VT4XJWPR6S7ZLK4VXQKEM9ATVES&client_secret=b101cd9
19c82e3b851fd75bf0567d6434c930dce42&scope=Desk.tickets.READ,Desk.tickets.ALL&re
direct_uri=https://www.zylker.com/oauthgrant&grant_type=refresh_token

Result:

{
"access_token":
"1000.a91ade7bd781d0fcde8c6f310c48cd4f.d9698db4c5da80dbcd92425
fd7c2394c",
"scope": "Desk.tickets.READ Desk.tickets.ALL",
"api_domain": "https://www.zohoapis.com",
"token_type": "Bearer",
"expires_in": 3600
}

2
3.Final callout to get data using token from above

https://desk.zoho.com/api/v1/tickets/109504000322548812
Org ID
Authorisation

Result:

{
"modifiedTime": "2024-05-04T05:25:27.000Z",
"subCategory": null,
"statusType": "Open",
"subject": "Booking.com - New sign-in to your account",
"dueDate": null,
"departmentId": "109504000000080766",
"channel": "Email",
"onholdTime": null,
"language": "English",
"source": {
"appName": null,
"extId": null,
"permalink": null,
"type": "SYSTEM",
"appPhotoURL": null
},
"resolution": null,
"sharedDepartments": [],
"closedTime": null,
"approvalCount": "0",
"isOverDue": false,
"isTrashed": false,
"createdTime": "2024-05-04T05:25:27.000Z",
"id": "109504000322548812",
"isResponseOverdue": false,
"customerResponseTime": "2024-05-04T05:25:27.000Z",
"productId": null,
"contactId": "109504000000103572",
"threadCount": "1",
"secondaryContacts": [],
"priority": null,
"classification": null,
"commentCount": "0",

3
"taskCount": "0",
"accountId": null,
"phone": "7827449532",
"webUrl": "https://support.staah.com/support/staah/
ShowHomePage.do#Cases/dv/109504000322548812",
"isSpam": false,
"status": "Open",
"entitySkills": [],
"ticketNumber": "962998",
"sentiment": null,
"customFields": {
"Classifications ": null,
"Payment Gateway Partners": null,
"Termination Description - Details": null,
"Product": null,
"Training Classification": null,
"Property Name and MAX ID": null,
"Affiliate": null,
"PMS Partners": null,
"MAX ID and Property Name": null,
"Trial Status": null,
"Mapping Categories": null,
"Multiselect 1": null,
"Feedback": null,
"Termination Reason": null,
"Affiliats": null,
"Is this a Reseller's Property?": null,
"Reason for selecting Others": null,
"Phone 1": null,
"OTA Partners": null,
"STAAH Direct": null,
"Reseller Property Name - STAAH ID": null,
"Picklist 2": null,
"Picklist 1": null,
"Existing Property Name – STAAH ID": null,
"New Trial": "false",
"Property Name – STAAH ID": null,
"Property Name - MAX Property ID": null,
"Ticket Type": null,
"Select Ticket Type": null
},
"isArchived": false,
"description": null,

4
"timeEntryCount": "0",
"channelRelatedInfo": null,
"responseDueDate": null,
"isDeleted": false,
"modifiedBy": "109504000000070035",
"followerCount": "0",
"email": "[email protected]",
"layoutDetails": {
"id": "109504000016255027",
"layoutName": "Oceania"
},
"channelCode": null,
"isFollowing": false,
"cf": {
"cf_ticket_type": null,
"cf_property_name_max_property_id": null,
"cf_is_this_a_reseller_s_property": null,
"cf_property_name": null,
"cf_select_ticket_type": null,
"cf_reason_for_selecting_others": null,
"cf_classifications": null,
"cf_feedback": null,
"cf_new_trial": "false",
"cf_picklist_1": null,
"cf_picklist_2": null,
"cf_picklist_3": null,
"cf_picklist_3_1": null,
"cf_picklist_2_1": null,
"cf_multi_line_1": null,
"cf_product": null,
"cf_ota_partners": null,
"cf_max_id_and_property_name": null,
"cf_payment_gateway_partners": null,
"cf_pms_partners": null,
"cf_staah_direct": null,
"cf_trial_status": null,
"cf_termination_reason": null,
"cf_existing_property_name_staah_id": null,
"cf_termination_description_details": null,
"cf_reseller_property_name_staah_id": null,
"cf_phone_1": null,
"cf_mapping_issues": null,
"cf_multiselect_1": null

5
},
"slaId": null,
"layoutId": "109504000016255027",
"assigneeId": null,
"createdBy": "109504000000070035",
"teamId": null,
"tagCount": "0",
"attachmentCount": "0",
"isEscalated": false,
"category": null
}
{
"modifiedTime": "2024-05-04T05:25:27.000Z",
"subCategory": null,
"statusType": "Open",
"subject": "Booking.com - New sign-in to your account",
"dueDate": null,
"departmentId": "109504000000080766",
"channel": "Email",
"onholdTime": null,
"language": "English",
"source": {
"appName": null,
"extId": null,
"permalink": null,
"type": "SYSTEM",
"appPhotoURL": null
},
"resolution": null,
"sharedDepartments": [],
"closedTime": null,
"approvalCount": "0",
"isOverDue": false,
"isTrashed": false,
"createdTime": "2024-05-04T05:25:27.000Z",
"id": "109504000322548812",
"isResponseOverdue": false,
"customerResponseTime": "2024-05-04T05:25:27.000Z",
"productId": null,
"contactId": "109504000000103572",
"threadCount": "1",
"secondaryContacts": [],
"priority": null,

6
"classification": null,
"commentCount": "0",
"taskCount": "0",
"accountId": null,
"phone": "7827449532",
"webUrl": "https://support.staah.com/support/staah/
ShowHomePage.do#Cases/dv/109504000322548812",
"isSpam": false,
"status": "Open",
"entitySkills": [],
"ticketNumber": "962998",
"sentiment": null,
"customFields": {
"Classifications ": null,
"Payment Gateway Partners": null,
"Termination Description - Details": null,
"Product": null,
"Training Classification": null,
"Property Name and MAX ID": null,
"Affiliate": null,
"PMS Partners": null,
"MAX ID and Property Name": null,
"Trial Status": null,
"Mapping Categories": null,
"Multiselect 1": null,
"Feedback": null,
"Termination Reason": null,
"Affiliats": null,
"Is this a Reseller's Property?": null,
"Reason for selecting Others": null,
"Phone 1": null,
"OTA Partners": null,
"STAAH Direct": null,
"Reseller Property Name - STAAH ID": null,
"Picklist 2": null,
"Picklist 1": null,
"Existing Property Name – STAAH ID": null,
"New Trial": "false",
"Property Name – STAAH ID": null,
"Property Name - MAX Property ID": null,
"Ticket Type": null,
"Select Ticket Type": null
},

7
"isArchived": false,
"description": null,
"timeEntryCount": "0",
"channelRelatedInfo": null,
"responseDueDate": null,
"isDeleted": false,
"modifiedBy": "109504000000070035",
"followerCount": "0",
"email": "[email protected]",
"layoutDetails": {
"id": "109504000016255027",
"layoutName": "Oceania"
},
"channelCode": null,
"isFollowing": false,
"cf": {
"cf_ticket_type": null,
"cf_property_name_max_property_id": null,
"cf_is_this_a_reseller_s_property": null,
"cf_property_name": null,
"cf_select_ticket_type": null,
"cf_reason_for_selecting_others": null,
"cf_classifications": null,
"cf_feedback": null,
"cf_new_trial": "false",
"cf_picklist_1": null,
"cf_picklist_2": null,
"cf_picklist_3": null,
"cf_picklist_3_1": null,
"cf_picklist_2_1": null,
"cf_multi_line_1": null,
"cf_product": null,
"cf_ota_partners": null,
"cf_max_id_and_property_name": null,
"cf_payment_gateway_partners": null,
"cf_pms_partners": null,
"cf_staah_direct": null,
"cf_trial_status": null,
"cf_termination_reason": null,
"cf_existing_property_name_staah_id": null,
"cf_termination_description_details": null,
"cf_reseller_property_name_staah_id": null,
"cf_phone_1": null,

8
"cf_mapping_issues": null,
"cf_multiselect_1": null
},
"slaId": null,
"layoutId": "109504000016255027",
"assigneeId": null,
"createdBy": "109504000000070035",
"teamId": null,
"tagCount": "0",
"attachmentCount": "0",
"isEscalated": false,
"category": null
}

9
10

You might also like