Created
May 16, 2022 11:00
-
-
Save dubeyji10/5cc48254e039a2e50ea50dd67fe76e21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
on the zoho crm dashboard
data fetched using request in postman