Circuit-sdk - how to interact via .net?

134 views Asked by At

I'm trying to write a .net console application in c# that will execute (via a windows scheduled task) nightly and do a number of admin things (moving files around and so on). I want it to then report its status (good/bad/in-between) to a circuit chat.

I'm lost as to how to do this circuit reporting step. What visual studio extensions/apis (if any) exist to help with this? I've read up on the rest API, the node.js one etc, but I'm not sure how to use these from my console app.

Any pointers or ideally examples on this would be much appreciated.

Thanks in advance.

1

There are 1 answers

4
Roger Urscheler On BEST ANSWER

We have a .NET client in alpha. Reply to the email you got for your OAuth app registration and mention you'd like to try out the .NET alpha version. If you haven't registered for a OAuth app, then please do so as you will need that independent of which Circuit API you'll use. See instructions at https://circuit.github.io/.

But if all you want to do is to send a message in a conversation, then the better option is to use the REST API.See endpoint /conversations/{convId}/messages at https://circuitsandbox.net/rest/v2/swagger/ui/index.html. You can then make a REST API call in .NET using HttpClient. Something like this https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclient.