I am trying to send a template message via gupshup using their unified single sendmessage API endpoint https://api.gupshup.io/sm/api/v1/msg
We have a template message approved with the relevant wording in it, and specified that there should be an attachment. When we try and send the attachment it fails with the following message, (1005) Message sending failed as user is inactive for session message and template did not match
Within the message element which is encoded JSON I have tried the a couple of options, all of which reject with the same message as above.
innerJson = { "isHSM": "true", "type": "file", "url": fileURL + location, "filename": filename, "text": message }
innerJson = { "isHSM": "true", "type": "file", "url": fileURL + location, "filename": filename, "caption": message }
innerJson = { "type": "file", "url": fileURL + location, "filename": filename, "text": message }
innerJson = { "type": "file", "url": fileURL + location, "filename": filename, "caption": message }
Can't find any explicit examples in the gupshup documentation of how to do this.