SlackAPI Documentation

repository·master·Indexed 19 days ago

https://github.com/inumedia/slackapi

A third-party C# library providing a wrapper for Slack's WebAPI and Real Time Messaging (RTM) API for .NET applications. Supports .NET Framework 4.5 and .NET Standard 1.3, 1.6, and 2.0.

Tokens
447
Snippets
2
Records
3
Agent score
16%

What's inside SlackAPI

  1. Install the SlackAPI NuGet package

    master

    You can install the SlackAPI library via NuGet. The package supports the following platforms:

    • .NET Framework 4.5
    • .NET Standard 1.3 (includes UWP support, but note that it cannot detect SlackSocketRouting attributes in loaded assemblies)
    • .NET Standard 1.6
    • .NET Standard 2.0
    dotnet add package SlackAPI
  2. Configure config.json for testing SlackAPI

    master

    If you are building the solution from source and wish to run the SlackAPI.Tests project, you must provide a config.json file.

    To set this up:

    1. Copy config.default.json to a new file named config.json.
    2. Update the following keys in config.json:
      • userAuthToken: A user token generated via Slack OAuth Test Tokens.
      • botAuthToken: A bot token created via Slack Bot creation.
      • testChannel: A valid Slack channel ID (the user associated with userAuthToken must be a member of this channel).
      • directMessageUser: A Slack member username.

    Note: clientId, clientSecret, and authCode are not used for these tests.

    {
      "userAuthToken": "YOUR_USER_TOKEN",
      "botAuthToken": "YOUR_BOT_TOKEN",
      "testChannel": "CHANNEL_ID",
      "directMessageUser": "USERNAME"
    }