Skip to content

Instantly share code, notes, and snippets.

@dubeyji10
Created May 16, 2022 11:00
Show Gist options
  • Save dubeyji10/5cc48254e039a2e50ea50dd67fe76e21 to your computer and use it in GitHub Desktop.
Save dubeyji10/5cc48254e039a2e50ea50dd67fe76e21 to your computer and use it in GitHub Desktop.
import requests
import pprint
import json
'''
Note : add https:// to the url it wont work without it
and for indian region use .in for accounts-domain(or accounts-url)
, and for api-domain
to get conversation from zoho crm
url = https://www.zohoapis.in/crm/v2/custom-module-name
'''
url = "https://www.zohoapis.in/crm/v2/conversation"
payload={}
# try headers without Cookie
# headers = {
# 'Authorization': 'Bearer your-access-token',
# 'Cookie': 'your-cookie-remove-if-none'
# }
headers = {
'Authorization': 'Bearer your-access-token',
}
# works without Cookie
response = requests.request("GET", url, headers=headers, data=payload)
# print(response.text)
# print('-'*100)
# pprint.pprint(response.json)
# print('-'*100)
# pprint.pprint(response.text)
print('\n\n')
# json.loads not json.load
print('-'*100)
pprint.pprint(json.loads(response.text))
@dubeyji10
Copy link
Author

on the zoho crm dashboard

custom_module_conversation

data fetched using request in postman

custom_module_test_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment