I want to write a small program, that allows me to reply or simply write a message at a certain time in the amazon chime app. I recently learned flutter and am learning now JavaScript. So at the moment this is to complicated for me to understand IF it is possible. Can someone help me with that?
Asked
Active
Viewed 792 times
1 Answers
0
If you are sending messages to a chime room you can do it via HTTP POST.
- Create a chime room
- From the room settings menu, under Manage WebHooks and Bots add new WebHook and give it a name
- Once the WebHook is in the room, you will see a button 'Copy URL' next to its name. Click this button to copy the URL as this is where you need to post your message.
Here's an example Sub routine I'm using under VBA to send automated messages
Sub MessageChime(WebHook As String, MessageContent As String)
Dim oHttp As Object
Dim body As String
body = "{""Content"":""" + MessageContent + """}"
Set oHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
oHttp.Open "POST", WebHook, False
oHttp.setRequestHeader "Content-type", "application/json"
oHttp.send body
End Sub
Then you can send your desired message like this
Call MessageChime("your copied URL from the WebHook As String", "Your message here as a string")
The message will be sent in the room where you added the WebHook. You can try port this to whatever language you are using as long as you are able to make POST requests

al1en
- 511
- 1
- 5
- 28