OverviewPlatformsAPI ReferenceResources
All platforms

Slack

Messaging

Publish messages and thread replies to a Slack channel with the Zernio API, with file uploads, a per-message bot identity, and an inbox that receives DMs and mentions in realtime.

Authentication details

Connecting accounts guide
OAuth 2.0 (Bot)

Permissions19 scopes

Always requested
Posting
Messaging

Pass scopes=posting,analytics to the connect endpoint to ask only for those areas. The first row comes with every connection.

Publish messages and thread replies to a Slack channel with POST /v1/posts and platform: "slack".

The same account receives DMs and bot mentions in the inbox, and can start a DM with any member of its workspace.

Quick reference

PropertyValue
Content limit40,000 characters (Slack truncates silently beyond this)
Edit limit4,000 characters (longer posts cannot be edited)
Media per postUp to 10 files
FormattingSlack mrkdwn
Post typesChannel messages, thread replies
SchedulingYes (Zernio-side; Slack's native scheduler is not used)
ThreadsYes (threadTs)
Link unfurlingConfigurable per post
Per-message identityYes (display name and avatar override)
Inbox (DMs)Yes
Start a conversationYes (DM any member of the workspace)
Inbox (channel messages)Mentions and threads only, not all chatter
Contacts and built-in automationsDMs only
AnalyticsNo (Slack has no public message analytics API)

Before you start

Slack requires the Zernio bot app installed in the workspace.

You do not create your own Slack app, host a bot or manage tokens. The user installs Zernio's app through OAuth and you post through the API.

One connected account is one channel. To publish to several channels, connect each one as its own account.

Public channels are joined automatically on connect.

Private channels need a member to run /invite @Zernio in it first, because the bot cannot join a private channel on its own. Until then it does not appear in the channel list.

Admin approval. Some workspaces require admin approval for new apps, so Slack may show a "request approval" screen.

Marketplace-only workspaces. A workspace can be configured to allow only apps listed in the Slack Marketplace.

Zernio's app is distributed but not yet listed, so Slack says it "has not been reviewed by Slack" during install. That is expected.

Connect

Call GET /v1/connect/slack with profileId on List Slack channels.

With no pendingDataToken or accountId, it returns the authUrl and state that start OAuth, like GET /v1/connect/{platform} does for other platforms.

The full flow, with code for every step, is on Connect.

Publish a post

This request sends a message to a Slack channel right away.

TypeScript
import Zernio from '@zernio/node';

const zernio = new Zernio();

const { data: published } = await zernio.posts.createPost({
  body: {
    content: 'Deploy finished :rocket:',
    platforms: [
      { platform: 'slack', accountId: '66b2e19d8c3f5a7e9d0b1c2d' }
    ],
    publishNow: true
  }
});

console.log(published.post.platforms[0].platformPostUrl);

Every option is on Publish.

In this section

Was this page helpful?

On this page