mkarwicki | 2021-01-19 17:42:38 UTC | #1
Hi, have anyone successfully send an message through:
https://api.mypurecloud.de/api/v2/conversations/messages/agentless
Endpoint.
I have struggled with this endpoint for an hour's with my team and all the time we receive the info:
{ "message": "Bad request: Invalid messenger type: <facebook>", "code": "bad.request", "status": 400, "messageWithParams": "Bad request: {details}", "messageParams": { "details": "Invalid messenger type: <facebook>" }, "contextId": "0d4bcaf8-0e16-43bf-9d7f-24affeec5e17", "details": [], "errors": [] }
We easily manage to Auth with Client Credentials and Send request with Bearer Token.
Our payload looks like this: { "fromAddress": "b16ee63d-c850-463d-ab11-48d0c077eef7", "toAddress": "3559467640845952", "toAddressMessengerType": "facebook", "textBody": "test Postman" }
From Address is the Facebook Integration ID
To Address we have tried with real FB user ID and the one from Conversation Details (and we have tried multiple alternatives on this with no success)
... "toAddress": { "name": "Michał Karwicki", "addressNormalized": "3559467640845952", "addressRaw": "3559467640845952" }, "fromAddress": { "name": "FacebookForCXIndex", "addressNormalized": "b16ee63d-c850-463d-ab11-48d0c077eef7" }, ...
If we change the "toAddressMessengerType": "facebook", for example to "toAddressMessengerType": "facebook2",
Then we got response:
{ "message": "Value [facebook2] is not valid for field type [MessengerType]. Allowable values are: sms, facebook, twitter, line, whatsapp, webmessaging", "code": "invalid.value", "status": 400 }
So All of the fields are valid except for MessangerType.
More to all of it when we try to "Create an outbound messaging conversation." with this payload: { "queueId": "b16ee63d-c850-463d-ab11-48d0c077eef7", "toAddress": "3986587601370934", "toAddressMessengerType": "facebook", "useExistingConversation": true, "externalContactId": "", "externalOrganizationId": "" }
we receive: { "message": "Phone number validation for address, 3986587601370934, failed on field, toAddress, with the following error: The phone number address is not in E.164 phone format.", "code": "invalid.phone.number", "status": 400, "messageWithParams": "Phone number validation for address, {address}, failed on field, {field}, with the following error: {error}", "messageParams": { "address": "3986587601370934", "field": "toAddress", "error": "The phone number address is not in E.164 phone format." }, "contextId": "c73af343-d7bb-41f9-9b19-383715c2c573", "details": [], "errors": [] }
That IMO once Facebook selected as toAddressMessengerType -> The request To Address should not be validated as Phone Number.
So not sure but this might be an API Bug?
Have any of Developer Community or from Genesys knows about this or can help us this issues?
Regards Michal Karwicki
Greg_Boston | 2021-01-19 19:36:38 UTC | #2
Sms is the only toAddressMessengerType that is suppported today through that resource. Please see https://help.mypurecloud.com/articles/agentless-sms-notifications/ and https://developer.mypurecloud.com/api/tutorials/agentless-sms-notifications/?language=java&step=1 I understand the doc didn't necessarily signal to you that sms was the only supported type today. We will work on updating that documentation to be more clear in the future.
mkarwicki | 2021-01-20 09:53:54 UTC | #3
Thanks Greg,
Yes it is very confusing and from the docs it kind of indicates that other channels are supported.
Still Do You know perhaps when other channels are going to be operational?
Are them like only on a backlog or it is work in progress?
Greg_Boston | 2021-01-20 13:22:14 UTC | #4
Hi Michael, They are not currently in progress. There are limitations with social messaging channels and the ability to even send an outbound initiated message. For instance with Facebook you would have to have the page scoped user id of the user you wanted to contact. Which would only be possible for end user's that had contacted your business's FB page first, previously. Also Facebook limits the type of messages you can send outbound initiated as well. https://developers.facebook.com/docs/messenger-platform/policy/policy-overview This doesn't mean it's impossible to do, but just that there are many caveats involved, and each messaging platform has different caveats. Each platform also updates their terms and usage workflows fairly regularly. sms is much easier because you only need the end user's number to contact them. I will say WhatsApp is likely to be the first social messaging channel for outbound initiated agentless messages, using WA templated messages. Please stay tuned https://help.mypurecloud.com/release-notes/ to announcements on when you could expect WA outbound initiated agentless messages
mkarwicki | 2021-01-20 13:57:28 UTC | #5
Thanks so much it covers all our concerns.
We know about limitations. If someone would have the same problem our solution is to send DMs to customers on Social Media (facebook, twitter, whatsapp) not through Genesys API but through dedicated social media API's.
Btw as we are lucky that we only send DM to inbound initiated interactions then we know the ID of the Participants. With this case (user ID) I think it would also be quite easy for Genesys to Enable endpoint to send Social MSG through API .
system | 2021-02-20 14:09:26 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 9743