Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loJson
LOCAL loResp
LOCAL loSbResponseBody
LOCAL loJResp
LOCAL lnRespStatusCode
LOCAL lcCode
LOCAL lcMessage
LOCAL lcStatus
LOCAL j
LOCAL lnCount_j
LOCAL lcChannel_expiry
LOCAL lcResource_uri
LOCAL lcResource_id
LOCAL lcResource_name
LOCAL lcChannel_id
LOCAL i
LOCAL lnCount_i
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')
* Use this online tool to generate code from sample JSON: Generate Code to Create JSON
* The following JSON is sent in the request body.
* {
* "watch": [
* {
* "channel_id": "1000000068001",
* "events": [
* "Solutions.create",
* "Price_Books.create",
* "Contacts.create",
* "Solutions.edit"
* ],
* "channel_expiry": "2018-02-02T10:30:00 05:30",
* "token": "TOKEN_FOR_VERIFICATION_OF_1000000068001",
* "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2"
* },
* {
* "channel_id": "1000000068002",
* "events": [
* "Deals.all"
* ],
* "channel_expiry": "2018-02-02T10:30:00 05:30",
* "token": "TOKEN_FOR_VERIFICATION_OF_1000000068002",
* "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1"
* },
* {
* "channel_id": "1000000068003",
* "events": [
* "Cases.all"
* ],
* "channel_expiry": "2018-02-02T10:30:00 05:30",
* "token": "TOKEN_FOR_VERIFICATION_OF_1000000068003",
* "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1"
* }
* ]
* }
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJson = CreateObject('Chilkat.JsonObject')
loJson.UpdateString("watch[0].channel_id","1000000068001")
loJson.UpdateString("watch[0].events[0]","Solutions.create")
loJson.UpdateString("watch[0].events[1]","Price_Books.create")
loJson.UpdateString("watch[0].events[2]","Contacts.create")
loJson.UpdateString("watch[0].events[3]","Solutions.edit")
loJson.UpdateString("watch[0].channel_expiry","2018-02-02T10:30:00 05:30")
loJson.UpdateString("watch[0].token","TOKEN_FOR_VERIFICATION_OF_1000000068001")
loJson.UpdateString("watch[0].notify_url","https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2")
loJson.UpdateString("watch[1].channel_id","1000000068002")
loJson.UpdateString("watch[1].events[0]","Deals.all")
loJson.UpdateString("watch[1].channel_expiry","2018-02-02T10:30:00 05:30")
loJson.UpdateString("watch[1].token","TOKEN_FOR_VERIFICATION_OF_1000000068002")
loJson.UpdateString("watch[1].notify_url","https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1")
loJson.UpdateString("watch[2].channel_id","1000000068003")
loJson.UpdateString("watch[2].events[0]","Cases.all")
loJson.UpdateString("watch[2].channel_expiry","2018-02-02T10:30:00 05:30")
loJson.UpdateString("watch[2].token","TOKEN_FOR_VERIFICATION_OF_1000000068003")
loJson.UpdateString("watch[2].notify_url","https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1")
* Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loResp = loHttp.PostJson3("https://domain.com/crm/v2.1/actions/watch","application/json",loJson)
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loJson
CANCEL
ENDIF
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder')
loSbResponseBody = CreateObject('Chilkat.StringBuilder')
loResp.GetBodySb(loSbResponseBody)
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJResp = CreateObject('Chilkat.JsonObject')
loJResp.LoadSb(loSbResponseBody)
loJResp.EmitCompact = 0
? "Response Body:"
? loJResp.Emit()
lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode >= 400) THEN
? "Response Header:"
? loResp.Header
? "Failed."
RELEASE loResp
RELEASE loHttp
RELEASE loJson
RELEASE loSbResponseBody
RELEASE loJResp
CANCEL
ENDIF
RELEASE loResp
* Sample JSON response:
* (Sample code for parsing the JSON response is shown below)
* {
* "watch": [
* {
* "code": "SUCCESS",
* "details": {
* "events": [
* {
* "channel_expiry": "2021-05-03T20:27:17+05:30",
* "resource_uri": "https://www.zohoapis.com/crm/v2/Contacts",
* "resource_id": "4150868000000002179",
* "resource_name": "Contacts",
* "channel_id": "1000000068001"
* },
* {
* "channel_expiry": "2021-05-03T20:27:17+05:30",
* "resource_uri": "https://www.zohoapis.com/crm/v2/Solutions",
* "resource_id": "4150868000000002211",
* "resource_name": "Solutions",
* "channel_id": "1000000068001"
* },
* {
* "channel_expiry": "2021-05-03T20:27:17+05:30",
* "resource_uri": "https://www.zohoapis.com/crm/v2/Price_Books",
* "resource_id": "4150868000000002217",
* "resource_name": "Price_Books",
* "channel_id": "1000000068001"
* }
* ]
* },
* "message": "Successfully subscribed for actions-watch of the given module",
* "status": "success"
* },
* {
* "code": "SUCCESS",
* "details": {
* "events": [
* {
* "channel_expiry": "2021-05-03T20:27:17+05:30",
* "resource_uri": "https://www.zohoapis.com/crm/v2/Deals",
* "resource_id": "4150868000000002181",
* "resource_name": "Deals",
* "channel_id": "1000000068002"
* }
* ]
* },
* "message": "Successfully subscribed for actions-watch of the given module",
* "status": "success"
* },
* {
* "code": "SUCCESS",
* "details": {
* "events": [
* {
* "channel_expiry": "2021-05-03T20:27:17+05:30",
* "resource_uri": "https://www.zohoapis.com/crm/v2/Cases",
* "resource_id": "4150868000000002209",
* "resource_name": "Cases",
* "channel_id": "1000000068003"
* }
* ]
* },
* "message": "Successfully subscribed for actions-watch of the given module",
* "status": "success"
* }
* ]
* }
* Sample code for parsing the JSON response...
* Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
i = 0
lnCount_i = loJResp.SizeOfArray("watch")
DO WHILE i < lnCount_i
loJResp.I = i
lcCode = loJResp.StringOf("watch[i].code")
lcMessage = loJResp.StringOf("watch[i].message")
lcStatus = loJResp.StringOf("watch[i].status")
j = 0
lnCount_j = loJResp.SizeOfArray("watch[i].details.events")
DO WHILE j < lnCount_j
loJResp.J = j
lcChannel_expiry = loJResp.StringOf("watch[i].details.events[j].channel_expiry")
lcResource_uri = loJResp.StringOf("watch[i].details.events[j].resource_uri")
lcResource_id = loJResp.StringOf("watch[i].details.events[j].resource_id")
lcResource_name = loJResp.StringOf("watch[i].details.events[j].resource_name")
lcChannel_id = loJResp.StringOf("watch[i].details.events[j].channel_id")
j = j + 1
ENDDO
i = i + 1
ENDDO
RELEASE loHttp
RELEASE loJson
RELEASE loSbResponseBody
RELEASE loJResp
Curl Command
curl -X POST
-H "Authorization: Bearer <access_token>"
-d '{
"watch": [
{
"channel_id": "1000000068001",
"events": [
"Solutions.create",
"Price_Books.create",
"Contacts.create",
"Solutions.edit"
],
"channel_expiry": "2018-02-02T10:30:00+05:30",
"token": "TOKEN_FOR_VERIFICATION_OF_1000000068001",
"notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2"
},
{
"channel_id": "1000000068002",
"events": [
"Deals.all"
],
"channel_expiry": "2018-02-02T10:30:00+05:30",
"token": "TOKEN_FOR_VERIFICATION_OF_1000000068002",
"notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1"
},
{
"channel_id": "1000000068003",
"events": [
"Cases.all"
],
"channel_expiry": "2018-02-02T10:30:00+05:30",
"token": "TOKEN_FOR_VERIFICATION_OF_1000000068003",
"notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1"
}
]
}'
https://domain.com/crm/v2.1/actions/watch
Postman Collection Item JSON
{
"name": "Enable Notifications",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access-token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"channel_id\": \"1000000068001\",\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n },\n {\n \"channel_id\": \"1000000068002\",\n \"events\": [\n \"Deals.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1\"\n },\n {\n \"channel_id\": \"1000000068003\",\n \"events\": [\n \"Cases.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
},
"description": "To enable instant notifications of actions performed on a module."
},
"response": [
{
"name": "SUCCESS RESPONSE",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"channel_id\": \"1000000068001\",\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n },\n {\n \"channel_id\": \"1000000068002\",\n \"events\": [\n \"Deals.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1\"\n },\n {\n \"channel_id\": \"1000000068003\",\n \"events\": [\n \"Cases.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Mon, 03 May 2021 12:57:17 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-ACCESSTOKEN-RESET",
"value": "2021-05-03T19:27:14+05:30"
},
{
"key": "clientVersion",
"value": "4002155"
},
{
"key": "clientsubVersion",
"value": "bfb2326744b42e5c869a705645ac0006"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "vary",
"value": "accept-encoding"
},
{
"key": "Content-Encoding",
"value": "gzip"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=63072000"
}
],
"cookie": [
],
"body": "{\n \"watch\": [\n {\n \"code\": \"SUCCESS\",\n \"details\": {\n \"events\": [\n {\n \"channel_expiry\": \"2021-05-03T20:27:17+05:30\",\n \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Contacts\",\n \"resource_id\": \"4150868000000002179\",\n \"resource_name\": \"Contacts\",\n \"channel_id\": \"1000000068001\"\n },\n {\n \"channel_expiry\": \"2021-05-03T20:27:17+05:30\",\n \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Solutions\",\n \"resource_id\": \"4150868000000002211\",\n \"resource_name\": \"Solutions\",\n \"channel_id\": \"1000000068001\"\n },\n {\n \"channel_expiry\": \"2021-05-03T20:27:17+05:30\",\n \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Price_Books\",\n \"resource_id\": \"4150868000000002217\",\n \"resource_name\": \"Price_Books\",\n \"channel_id\": \"1000000068001\"\n }\n ]\n },\n \"message\": \"Successfully subscribed for actions-watch of the given module\",\n \"status\": \"success\"\n },\n {\n \"code\": \"SUCCESS\",\n \"details\": {\n \"events\": [\n {\n \"channel_expiry\": \"2021-05-03T20:27:17+05:30\",\n \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Deals\",\n \"resource_id\": \"4150868000000002181\",\n \"resource_name\": \"Deals\",\n \"channel_id\": \"1000000068002\"\n }\n ]\n },\n \"message\": \"Successfully subscribed for actions-watch of the given module\",\n \"status\": \"success\"\n },\n {\n \"code\": \"SUCCESS\",\n \"details\": {\n \"events\": [\n {\n \"channel_expiry\": \"2021-05-03T20:27:17+05:30\",\n \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Cases\",\n \"resource_id\": \"4150868000000002209\",\n \"resource_name\": \"Cases\",\n \"channel_id\": \"1000000068003\"\n }\n ]\n },\n \"message\": \"Successfully subscribed for actions-watch of the given module\",\n \"status\": \"success\"\n }\n ]\n}"
},
{
"name": "INVALID_DATA",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"channel_id\": \"1000000068001\",\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001000000000000000\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
}
},
"status": "Accepted",
"code": 202,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Mon, 03 May 2021 12:58:30 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-ACCESSTOKEN-RESET",
"value": "2021-05-03T19:27:14+05:30"
},
{
"key": "clientVersion",
"value": "4002155"
},
{
"key": "clientsubVersion",
"value": "bfb2326744b42e5c869a705645ac0006"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
}
],
"cookie": [
],
"body": "{\n \"watch\": [\n {\n \"code\": \"INVALID_DATA\",\n \"details\": {\n \"maximum_length\": 50,\n \"api_name\": \"token\",\n \"json_path\": \"$.watch[0].token\"\n },\n \"message\": \"invalid data\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "MANDATORY_NOT_FOUND",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001000000000000000\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
}
},
"status": "Accepted",
"code": 202,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Mon, 03 May 2021 12:58:51 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "168"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-ACCESSTOKEN-RESET",
"value": "2021-05-03T19:27:14+05:30"
},
{
"key": "clientVersion",
"value": "4002155"
},
{
"key": "clientsubVersion",
"value": "bfb2326744b42e5c869a705645ac0006"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
}
],
"cookie": [
],
"body": "{\n \"watch\": [\n {\n \"code\": \"MANDATORY_NOT_FOUND\",\n \"details\": {\n \"api_name\": \"channel_id\",\n \"json_path\": \"$.watch[0].channel_id\"\n },\n \"message\": \"required field not found\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "OAUTH_SCOPE_MISMATCH",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"channel_id\": \"1000000068001\",\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n },\n {\n \"channel_id\": \"1000000068002\",\n \"events\": [\n \"Deals.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1\"\n },\n {\n \"channel_id\": \"1000000068003\",\n \"events\": [\n \"Cases.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Mon, 03 May 2021 13:33:20 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "113"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-Download-Options",
"value": "noopen"
}
],
"cookie": [
],
"body": "{\n \"code\": \"OAUTH_SCOPE_MISMATCH\",\n \"details\": {},\n \"message\": \"invalid oauth scope to access this URL\",\n \"status\": \"error\"\n}"
},
{
"name": "AUTHENTICATION_FAILURE",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"channel_id\": \"1000000068001\",\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n },\n {\n \"channel_id\": \"1000000068002\",\n \"events\": [\n \"Deals.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1\"\n },\n {\n \"channel_id\": \"1000000068003\",\n \"events\": [\n \"Cases.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 11 May 2021 07:37:57 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "98"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-Download-Options",
"value": "noopen"
}
],
"cookie": [
],
"body": "{\n \"code\": \"AUTHENTICATION_FAILURE\",\n \"details\": {},\n \"message\": \"Authentication failed\",\n \"status\": \"error\"\n}"
},
{
"name": "INVALID_REQUEST_METHOD",
"originalRequest": {
"method": "COPY",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"channel_id\": \"1000000068001\",\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n },\n {\n \"channel_id\": \"1000000068002\",\n \"events\": [\n \"Deals.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1\"\n },\n {\n \"channel_id\": \"1000000068003\",\n \"events\": [\n \"Cases.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 11 May 2021 07:38:27 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "124"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "X-Frame-Options",
"value": "deny"
},
{
"key": "X-Download-Options",
"value": "noopen"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
}
],
"cookie": [
],
"body": "{\n \"code\": \"INVALID_REQUEST_METHOD\",\n \"details\": {},\n \"message\": \"The http request method type is not a valid one\",\n \"status\": \"error\"\n}"
},
{
"name": "OAUTH_SCOPE_MISMATCH",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"watch\": [\n {\n \"channel_id\": \"1000000068001\",\n \"events\": [\n \"Solutions.create\",\n \"Price_Books.create\",\n \"Contacts.create\",\n \"Solutions.edit\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n },\n {\n \"channel_id\": \"1000000068002\",\n \"events\": [\n \"Deals.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1 key2=val2&key3=val1\"\n },\n {\n \"channel_id\": \"1000000068003\",\n \"events\": [\n \"Cases.all\"\n ],\n \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/actions/watch",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"actions",
"watch"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Thu, 13 May 2021 08:25:02 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "113"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-Download-Options",
"value": "noopen"
}
],
"cookie": [
],
"body": "{\n \"code\": \"OAUTH_SCOPE_MISMATCH\",\n \"details\": {},\n \"message\": \"invalid oauth scope to access this URL\",\n \"status\": \"error\"\n}"
}
]
}