POSTARYX

Discord

How to add Discord to your system

These are your credentials with the platform, not Postiz credentials.

The keys on this page belong to a developer app you register with the platform. Nobody from Postiz will ever ask for them.

Keep them in your environment or a secret manager, never in a committed .env file, and rotate them at the platform if they leak.

This integration requires that you have Manage Server permissions on the Discord server you want to integrate with.

Create a Discord Application

Login to Discord on the web, and then go to the Discord Developer Portal and click on "New Application".

New Application

Add an App Icon

App Icon

Upload the App Icon of your choice (1024x1024px max) and save your changes. If you do not do this, you will get 404 errors in logs when trying to add the Discord channel in the Postiz web interface.

Get and set your Client ID and Client Secret

You can find this in the OAuth2 section of the Discord Developer Portal.

Copy Keys

Set these in your .env file as follows;

DISCORD_CLIENT_ID="your_client_id"
DISCORD_CLIENT_SECRET="your_client_secret"

Add a Redirect URI

The OAuth2 Redirect URI is the location where the provider will redirect to after a successful login. This needs to be set to your Postiz FRONTEND_URL + /integrations/social/ + {provider}.

You only need to set one OAuth2 Redirect URI when you are setting up your Postiz app.

Your Discord OAuth2 Redirect URI:

  • Production: https://your-postiz-domain.com/integrations/social/discord
  • Local development: http://localhost:4200/integrations/social/discord
  • Docker: http://localhost:5000/integrations/social/discord

You can find this in the OAuth2 section of the Discord Developer Portal.

Redirect URI

Create a Bot

Navigate to the "Bot" section of the Discord Developer Portal. Fill out the bot details however you like, and then click "Reset Token".

With the token that is generated, set it in your .env file as follows;

DISCORD_BOT_TOKEN_ID="your_bot_token"

If you do not set this, you will get 404 errors when trying to add the Discord channel in the Postiz web interface.

Stop Postiz if it is running, and then start it using the .env file with the Discord details.

Add a Discord channel in the Postiz web interface

Go to the Postiz web interface, and click on the "Add Channel" button, and then select "Discord". You should be redirected to Discord to login.