crisp-im / python-crisp-api

🐍 Crisp API Python Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
28 stars 11 forks source link

check_people_profile_exists function throws JSONDecodeError, Expecting value: line 1 column 1 (char 0) #8

Closed mahmudulshuvo closed 4 years ago

mahmudulshuvo commented 4 years ago

Hi I'm trying to find the people id for an existing contact in the crisp. So I called this api like this.

response = client.website.check_people_profile_exists(settings.CRISP_WEBSITE_ID, 'test@crisp.chat')

But is throwing a JSONDecodeError exception. What I'm doing wrong?

p-maks commented 4 years ago

Looking at the apis this return HTTP 200 without any body when profile found, 404 otherwise. so not sure if api should return any body for result = req.json() or this needs to handle differently

eliottvincent commented 4 years ago

Hello there! Issue fixed with release v1.1.3: https://github.com/crisp-im/python-crisp-api/releases/tag/v1.1.3 Updated on PyPI too: https://pypi.org/project/crisp-api/