Is the AM Webhook compatitble with Discord webhook intergration?
Thanks for your question.
Webhooks are used to send out HTTP requests. Both Awesome Miner and Discord can send out these kind of HTTP requests. There are however no feature in Awesome Miner to receive incoming HTTP requests - so if Discord sends out something - Awesome Miner will not be able to receive it.
The Discord HTTP (Post) webhooks are a service to service to recevice the webhook and post the update to a discord channel. Please let me know how to send from AM and receive in Discord. Ive setup the channel and added the AM webhook url to discord, but am not able to get the notifications.
Thanks for the clarification. If Discord provides an endpoint where you can point external webhooks - it should be possible for Awesome Miner to send a webhook HTTP Post to this destination.
There is a rule action in Awesome Miner called "Send webhook request". You can enter the target URL (where Discord is listening to incoming requests), select POST as HTTP method, and then fill in the POST body. The POST body is likely a JSON structure with the properties that Discord expects according to their documentation. From an Awesome Miner point of view - it's just some text to be sent.
I tried, but AM send no webhook to Discord. I test it with a normal rule and a rule with activation via action toolbar.
Please open the Awesome Miner log file (toolbar: Tools -> Log File). Search for "Sending Webhook". If Awesome Miner sends the HTTP request, you should be able to see the URL it's being sent to. In case of connection failure, it should be logged as an exception.
I get this in the Log file:
15.06.2020 14:24:35.622 [122] [S Sending Webhook POST to:
https://discord.com/api/webhooks/722053497662472282/vN5L2VdtOUVQ2_qyNIdSjpd57gVa_krTXAzlRF9Xm8LLomBPungQwFDcL8hRuwvZfErz15.06.2020 14:24:35.836 [122] [E]System.Net.WebException: Der Remoteserver hat einen Fehler zurückgegeben: (400) Ungültige Anforderung.
15.06.2020 14:24:35.836 [122] [E] bei System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
bei System.Net.WebClient.UploadString(Uri address, String method, String data)
bei #=zlQ$o$K9xavCaceTJJ2KjUcQDwvKxfEvrGUqnmttdR6vm.#=zK$vF2Z0=(String #=zWbiXOg0=, #=zM7Yz8troyqNmb0JpIPVRuFrlS_Ydij54JLHkw$2h3yBK #=zt9myUJE=, String #=zzcig3Vs=)
And sometimes i only get this:
15.06.2020 15:38:45.322 [023] [S Sending Webhook POST to:
https://discord.com/api/webhooks/722053497662472282/vN5L2VdtOUVQ2_qyNIdSjpd57gVa_krTXAzlRF9Xm8LLomBPungQwFDcL8hRuwvZfErzBut i see no message in Discord.