400 errors when creating a new custom integration
Running:
with sunshine_conversations_client.ApiClient(self.__sunco_config) as api_client:
api_instance = sunshine_conversations_client.IntegrationsApi(api_client)
integration = sunshine_conversations_client.Integration(
type="custom"
)
try:
api_response = api_instance.create_integration(self.__sunco_app_id, integration)
pprint(api_response)
except sunshine_conversations_client.ApiException as e:
print("Exception when calling IntegrationsApi->create_integration: %s\n" % e)
Results in:
HTTP response body: {"errors":[{"code":"bad_request","title":"should have required property 'webhooks'"}]}
As far as I can tell webhooks is not required when creating a new custom integration, it is not clear to me where I should even be setting this.
while I'm here - there are some pretty dubious errors coming back even when I hit the HTTP API directly.
request body:
{'type': 'custom', 'displayName': 'brandonk', 'webhooks': [{'target': 'target', 'triggers': 'ee'}]}
error:
('{"errors":[{"code":"bad_request","title":".webhooks: should not have more ' 'than 1 items"}]}')
request body:
{'type': 'custom', 'displayName': 'brandonk', 'webhooks': []}
error:
('{"errors":[{"code":"bad_request","title":"should have required property ' '\'webhooks\'"}]}')