Question:
I submitted a /createMessage request and didn’t receive any response. I re-tried submitting the same request and, as a result, two identical messages were sent to users. Why?
Answer:
Some network problems might lead to a lack of response to /createMessage request submitted. It doesn’t necessarily mean the message wasn’t created.
Retrying a request might result in duplication of messages sent to users. To prevent sending several identical messages, add the “transactionId” parameter to your /createMessage request as follows:
“transactionId”: “6e22a9af-84e4-46e6-af16-e457a4a6e7e5”, // optional, string. Unique message identifier to prevent re-sending in case of network problems. Stored on the side of Pushwoosh for 1 day.
To each message generated by your CMS, you can assign a unique string that identifies this particular message. If you don’t receive any response from Pushwoosh when submitted the /createMessage request, you can safely retry the message by submitting the same /createMessage request with the very same “transactionId” value. If Pushwoosh has already accepted a message with this transactionId earlier, the duplicate message won’t be sent. If no message with this transactionId has been received in the last 24 hours, the push notification will be created.
Comments
0 comments
Please sign in to leave a comment.