Dev Q — barebones serverside example

Hey @Andrew ,

The .NET SDK has been designed to be used primarily with SpeckleManager, but it’s possible to also use it without.

For example, see the code below:

using Speckle.Core.Api;
using Speckle.Core.Credentials;
using System;

namespace SpeckleSampleApp
{
  class Program
  {
    static void Main(string[] args)
    {
      var account = new Account();
      account.token = "YOUR-PERSONAL-ACCESS-TOKEN";
      account.serverInfo = new ServerInfo
      {
        url = "https://speckle.xyz/"
      };

      var client = new Client(account);
      var stream = client.StreamGet("5dfbeb49c9").Result;
    }
  }
}


You can generate personal access tokens from your Speckle profile page.

This is of course only one way, there are more! Especially if using Python or JS.

Any more questions just ask! I’ll make sure to update our docs with this little sample :slight_smile:

EDIT:

I think a nice addition to Core would be an overload for the Client constructor to directly take token and server url.

3 Likes