zendesk / zendesk/sunshine-conversations-python
Get and List Integrations Messenger and Whatsapp Sandbox
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I have an application with messenger integration and using the list_integrations method, returns the next exception because de page_access_token is None en the API response.
example code with get:
with sc.ApiClient(configuration) as api_client:
api_instance = sc.IntegrationsApi(api_client)
api_response = api_instance.get_integration(app_id, integration_id)
example code with list:
with sc.ApiClient(configuration) as api_client:
api_instance = sc.IntegrationsApi(api_client)
api_response = api_instance.list_integrations(app_id=app_id)
Error:
Traceback (most recent call last):
File "/Users/dfalcon/Code/smooch/poc_sunshine_conversations_v2/src/smooch/integrations/get.py", line 26, in <module>
get()
File "/Users/dfalcon/Code/smooch/poc_sunshine_conversations_v2/shared/exception_handler.py", line 7, in handler
return func(*args, **kwargs)
File "/Users/dfalcon/Code/smooch/poc_sunshine_conversations_v2/src/smooch/integrations/get.py", line 18, in get
api_response = api_instance.get_integration(app_id, integration_id, _return_http_data_only=False)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api/integrations_api.py", line 311, in get_integration
return self.get_integration_with_http_info(app_id, integration_id, **kwargs) # noqa: E501
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api/integrations_api.py", line 394, in get_integration_with_http_info
return self.api_client.call_api(
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 362, in call_api
return self.__call_api(resource_path, method,
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 206, in __call_api
return_data = self.deserialize(response_data, response_type)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 278, in deserialize
return self.__deserialize(data, response_type)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 317, in __deserialize
return self.__deserialize_model(data, klass, parent_data)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 660, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 317, in __deserialize
return self.__deserialize_model(data, klass, parent_data)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 670, in __deserialize_model
instance = self.__deserialize(data, klass_name, all_args)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 317, in __deserialize
return self.__deserialize_model(data, klass, parent_data)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 665, in __deserialize_model
instance = klass(**all_args)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/model/messenger.py", line 87, in __init__
self.page_access_token = page_access_token
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/model/messenger.py", line 140, in page_access_token
raise ValueError("Invalid value for page_access_token, must not be None") # noqa: E501
ValueError: Invalid value for page_access_token, must not be None
The same happens with an application with Whatsapp Sandbox Integration and deployment_id:
Traceback (most recent call last):
File "/Users/dfalcon/Code/smooch/poc_sunshine_conversations_v2/src/smooch/integrations/get.py", line 26, in <module>
get()
File "/Users/dfalcon/Code/smooch/poc_sunshine_conversations_v2/shared/exception_handler.py", line 7, in handler
return func(*args, **kwargs)
File "/Users/dfalcon/Code/smooch/poc_sunshine_conversations_v2/src/smooch/integrations/get.py", line 18, in get
api_response = api_instance.get_integration(app_id, integration_id)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api/integrations_api.py", line 311, in get_integration
return self.get_integration_with_http_info(app_id, integration_id, **kwargs) # noqa: E501
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api/integrations_api.py", line 394, in get_integration_with_http_info
return self.api_client.call_api(
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 362, in call_api
return self.__call_api(resource_path, method,
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 206, in __call_api
return_data = self.deserialize(response_data, response_type)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 278, in deserialize
return self.__deserialize(data, response_type)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 317, in __deserialize
return self.__deserialize_model(data, klass, parent_data)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 660, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 317, in __deserialize
return self.__deserialize_model(data, klass, parent_data)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 670, in __deserialize_model
instance = self.__deserialize(data, klass_name, all_args)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 317, in __deserialize
return self.__deserialize_model(data, klass, parent_data)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/api_client.py", line 665, in __deserialize_model
instance = klass(**all_args)
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/model/whatsapp.py", line 87, in __init__
self.deployment_id = deployment_id
File "/Users/dfalcon/Code/venvs/sunco/lib/python3.8/site-packages/sunshine_conversations_client/model/whatsapp.py", line 137, in deployment_id
raise ValueError("Invalid value for deployment_id, must not be None") # noqa: E501
ValueError: Invalid value for deployment_id, must not be None
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing get_integration and list_integrations with the Messenger and WhatsApp Sandbox examples. Inspect sunshine_conversations_client/model/messenger.py and whatsapp.py, then trace deserialization through api_client.py and integrations_api.py. Done means responses with absent page_access_token or deployment_id no longer fail during deserialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100