Creating Slack App Integration

Has anyone had success creating a slack app in Xojo? I’ve seen @Paul Lefebvre 's slack example, but this uses their deprecated API and I can’t seem to get anything more than a 102 error out of the API using Xojo, yet when I send the same exact request using Postman it runs just fine.

I’ve tried using both the classic framework and the namespaced framework and neither has gotten me anywhere.

Here is an example where I try to post a message:

Dim socket As New HTTPSocket Dim URL As String = "https://hooks.slack.com/services/yourURL" Dim s As String = "{""text"":""" + content.Text + """}" socket.SetRequestContent( s , "application/json" ) Dim response As String Response = socket.Post( URL, 30 )
And yet I get no response

Slack documentation: https://api.slack.com/incoming-webhooks

What do you get with Paw, the same endpoint, and the same data?

Edit: Fixed capitalization, wrongfully assumed Paw was an acronym. It’s not.

I use Postman and get a response of “ok” with an HTTP Status Code of 200.

You might want use HTTPSecureSocket instead of HTTPSocket.

I have a simple web hook Slack app based on Paul’s class using a Xojo.Net.HTTPSocket as the parent and it works well. The code is super simple and it really just boils down to the web hook URL and then POSTing the “text” value which it looks as though you’re doing so I think the tip on using a secure socket, above, might be the solution you need. :slight_smile:

That seemed to fix it. Thank you @Tim Dietrich and @Jason Tait