Closed c-delouvencourt closed 1 year ago
Hi there
Can I ask how you are sending your picker?
Are you pushing that message with the SDK?
If so, could I see the full part of code relevant to that method?
Hi Baptiste, we are sending the picker like that : https://hastebin.com/share/epiwuxeyud.javascript
Baptiste Jamin
On 14 Feb 2023, at 11:04, Clément @.***> wrote:
Hi Baptiste, we are sending the picker like that : https://hastebin.com/share/epiwuxeyud.javascript
— Reply to this email directly, view it on GitHub https://github.com/crisp-im/node-crisp-api/issues/50#issuecomment-1429456725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGTRQ4DZJWDEYC45ZBFVWDWXNKCTANCNFSM6AAAAAAU3K4U6Q. You are receiving this because you commented.
Same issue with operator
Can you please check all the types according to https://docs.crisp.chat/references/rest-api/v1/#send-a-message-in-conversation ?
-- Baptiste Jamin
On 14 Feb 2023, at 11:15, Clément @.***> wrote:
Same issue with operator
— Reply to this email directly, view it on GitHub https://github.com/crisp-im/node-crisp-api/issues/50#issuecomment-1429473102, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGTRQ4RBEPLCUVMEQQBLU3WXNLNJANCNFSM6AAAAAAU3K4U6Q. You are receiving this because you commented.
I checked all the types are correct I think there is an error on the validation of the type field on your side
There is no error on our side, your payload is invalid.
As stated in our API Reference, the text
property is mandatory.
This payload will work (I simply added the text
property):
{
"type": "picker",
"from": "operator",
"origin": "chat",
"user": {
"type": "participant",
"nickname": "Edouard",
"avatar": "https://i.imgur.com/4hh6oao.jpg"
},
"content": {
"id": "aws_image_picker",
"text": "Some text here",
"choices": [
{
"value": "Connexion hektor",
"label": "Connexion hektor",
"selected": false
},
{
"value": "Activer une passerelle de diffusion",
"label": "Activer une passerelle de diffusion",
"selected": false
},
{
"value": "Personnaliser mon profil Hektor",
"label": "Personnaliser ou modifier mon profil hektor",
"selected": false
},
{
"value": "exporter un bien ",
"label": "Problème d'exportation d'un bien",
"selected": false
},
{
"value": "Autre question",
"label": "Autre question",
"selected": false
}
]
}
}
Hello,
We have an issue when sending picker message in a conversation, could you help us please ?
The request with :
CrispClient.website.sendMessageInConversation
The response :
{ "reason": "error", "message": "invalid_data", "code": 400, "data": { "namespace": "response", "message": "Got response error: data.type should be equal to one of the allowed values, data.type should be equal to one of the allowed values, data.type should be equal to one of the allowed values, data.type should be equal to one of the allowed values, data.content should have required property 'text', data.type should be equal to one of the allowed values, data.type should be equal to one of the allowed values, data.type should be equal to one of the allowed values, data should match some schema in anyOf" } }