J'essaie twilio services et l'envoi de notification fonctionne bien, mais je ne peux pas mettre en place le repli de sms correctement car ce n'est pas vraiment documenté.Comment remplir les données SMS dans la notification
HashMap<String, Object> smsNumbers = new HashMap<>();
smsNumbers.put("?", "?");
LOGGER.debug("Adding SMS fallback to: {}", smsNumbers);
LOGGER.debug("Calling sendNotification to {}", identity);
Notification notification = Notification
.creator(twilioServiceSid)
.setBody(message)
.setData(data)
.setIdentity(identity)
.setSms(smsNumbers)
.create(restClient);
Je reçois l'erreur suivante:
com.twilio.exception.ApiException: Parameter 'Sms' contains unrecognized property.
at com.twilio.rest.notify.v1.service.NotificationCreator.create(NotificationCreator.java:316) [twilio-7.15.1.jar:]
Comment remplir le HashMap?
Vous pouvez passer null à setSms. Cela fonctionnera –
Vérifiez cette page https://www.twilio.com/docs/api/notify/rest/notifications –