You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error:
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 32, in reply
return self.__reply(reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 62, in __reply
response = self.client.post(self.resource_url(_id), reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 96, in post
return self._execute_request(req, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 84, in _execute_request
result = request.execute(self.base_url, self._auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 36, in execute
return self.send_request_to_path(base_url, auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 84, in send_request_to_path
parsed_body = self.parse_body(resp)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 98, in parse_body
self.raise_application_errors_on_failure(body, resp.status_code) # noqa
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 154, in raise_application_errors_on_failure
raise error_class(message, error_context)
intercom.errors.BadRequestError: Type can't be nil
If I remove type:
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 32, in reply
return self.__reply(reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 62, in __reply
response = self.client.post(self.resource_url(_id), reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 96, in post
return self._execute_request(req, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 84, in _execute_request
result = request.execute(self.base_url, self._auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 36, in execute
return self.send_request_to_path(base_url, auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 84, in send_request_to_path
parsed_body = self.parse_body(resp)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 98, in parse_body
self.raise_application_errors_on_failure(body, resp.status_code) # noqa
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 154, in raise_application_errors_on_failure
raise error_class(message, error_context)
intercom.errors.BadRequestError: Type can't be nil
User reply:
intercom.conversations.reply(id="56789", type='user', user_id="1111",message_type='comment', body="user say hello", attachment_urls=[None])
intercom.conversations.reply(
type="admin",
subject=subject,
id=convo_id,
message_type='inapp',
email="[email protected]",
body=message,
admin_id=INTERCOM_ADMIN_ID
)
Error:
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 32, in reply
return self.__reply(reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 62, in __reply
response = self.client.post(self.resource_url(_id), reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 96, in post
return self._execute_request(req, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 84, in _execute_request
result = request.execute(self.base_url, self._auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 36, in execute
return self.send_request_to_path(base_url, auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 84, in send_request_to_path
parsed_body = self.parse_body(resp)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 98, in parse_body
self.raise_application_errors_on_failure(body, resp.status_code) # noqa
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 154, in raise_application_errors_on_failure
raise error_class(message, error_context)
intercom.errors.BadRequestError: Type can't be nil
If I remove type:
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 32, in reply
return self.__reply(reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/service/conversation.py", line 62, in __reply
response = self.client.post(self.resource_url(_id), reply_data)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 96, in post
return self._execute_request(req, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/client.py", line 84, in _execute_request
result = request.execute(self.base_url, self._auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 36, in execute
return self.send_request_to_path(base_url, auth, params)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 84, in send_request_to_path
parsed_body = self.parse_body(resp)
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 98, in parse_body
self.raise_application_errors_on_failure(body, resp.status_code) # noqa
File "/home/goose/miniconda3/envs/venv/lib/python3.7/site-packages/intercom/request.py", line 154, in raise_application_errors_on_failure
raise error_class(message, error_context)
intercom.errors.BadRequestError: Type can't be nil
I think there is nothing wrong with the library, the API must have change. Documentation states that type is required. https://developers.intercom.com/intercom-api-reference/reference#replying-to-a-conversation
The text was updated successfully, but these errors were encountered: