Skip to content

A new self-hosted bot opens a setup page before anyone can sign in. Choose Sign in on the bot’s home page, or open <bot address>/setup, and the bot shows it. Only the Twitch app step is required. You can skip every other step and add those keys later.

You need the bot running and open in your browser, as in Install with Docker. To register your own Twitch app, you also need a Twitch account with a verified email address and two-factor authentication. Twitch asks for both before it lets you register an application.

The steps

The page has six steps, numbered 1 to 6 in a row at the top: Twitch app, Bot account, Spotify, Discord, YouTube and Finish setup. On a narrow screen, the row shows “Step 1 of 6” and the name of the current step instead.

Under each card, Back goes to the step before. On the Twitch app step, Next stays off until the step is done. On an optional step you have not done, the same button reads Skip, and once you save that step it reads Next.

The shortest route uses the shared NomNomzBot app, so you register nothing:

  1. On the Twitch app step, choose Use the shared NomNomzBot app, then choose Next. The shared app costs you three things:
    • You sign in to the dashboard with a code, never with one tap.
    • You cannot add a bot account in step 2.
    • The broadcaster account speaks as the bot in chat.
  2. Choose Skip on steps 2 to 5.
  3. On the last card, choose the Finish setup button.

1. Twitch app

The bot talks to Twitch through a Twitch app. The card recommends that you register your own, or you can choose Use the shared NomNomzBot app as in the shortest route. The Client ID field starts empty, and only Save with your own Client ID or Use the shared NomNomzBot app finishes this step.

A secret in Client Secret (optional) adds one-tap sign-in, on buttons such as Continue as broadcaster, and lets you add a bot account in step 2. One-tap sign-in works only when you open the bot on an https address, or on localhost on the computer that runs it. On any other address, you sign in with a code, with or without the secret. Keep the secret private, like a password.

To use your own app:

  1. Open the Twitch Developer Console from the link on the card, and sign in to Twitch there.
  2. Choose Register Your Application.
  3. Fill in the Twitch form:
    • Name: any name for your bot. It must be unique among all Twitch applications.
    • OAuth Redirect URLs: the address the card shows. Use the copy button beside it, paste it, and choose Add.
    • Category: choose “Chat Bot”.
  4. Tick the “I’m not a robot” box, and choose Create.
  5. Choose Manage on your new app, copy its Client ID, and paste it into Client ID on the card.
  6. For one-tap sign-in and a bot account, choose New Secret on the same Twitch page, and paste the secret into Client Secret (optional). Twitch shows the secret only once, so paste it before you leave that page.
  7. Choose Save. Next turns on, so choose Next.

2. Bot account

This step is optional. Skip it, and the broadcaster account acts as the bot in chat. The bot account page explains which account the bot types from. The step needs your own Twitch app with its secret saved in Client Secret (optional) in step 1.

Twitch approves the account that is signed in to Twitch in the browser where the Twitch link opens. If you sign in to Twitch as the bot in this browser, it stays signed in as the bot afterward. Twitch would then sign you in to the dashboard as the bot instead of as the broadcaster, so the last step below signs you out of Twitch.

To add the bot account in this browser:

  1. Sign in to Twitch as the bot’s own account in this browser.
  2. Choose Authorize the bot account. Twitch opens in a new tab, and the card shows “Waiting for you to approve the account on Twitch…”.
  3. Approve the chat permissions that Twitch asks for.
  4. Go back to the setup tab. Within a few seconds, the card shows “Connected:” and the name of the account. Choose Next.
  5. Sign out of Twitch in this browser before you sign in to the dashboard.

If the bot account is signed in to Twitch in another browser or profile:

  1. Choose Authorize the bot account.
  2. Close the Twitch tab that opens in this browser.
  3. Under “Use another browser or profile? Copy this link there.”, choose the copy button beside the link.
  4. In the other browser, paste the link into the address bar, press Enter, and approve the chat permissions there.
  5. Go back to the setup tab. Within a few seconds, the card shows “Connected:” and the name of the account. Choose Next.

3 to 5. Spotify, Discord and YouTube

These three steps are optional. Each card links to that service’s developer console and shows an address, with a copy button, to add to the app you make there. Each card has two fields, Client ID and Client Secret, and Save turns on only when both are filled in. After Save, the button under the card reads Next, so choose Next.

Saving stores the keys on the bot. It does not connect your account yet. After you sign in, connect each service as its own page explains: Spotify, Discord and YouTube.

Spotify

Spotify keys turn on song requests.

  1. Make the app as in Make your Spotify app, with the address from the card as its redirect address.
  2. Paste the app’s Client ID into Client ID, and its Client secret into Client Secret.
  3. Choose Save.

Discord

Discord keys turn on notifications and server sync.

  1. Open the Discord developer portal from the link on the card, and create an application.
  2. On the application’s OAuth2 page, add the address from the card as a Redirect.
  3. From the same OAuth2 page, paste the Client ID into Client ID, and the Client Secret into Client Secret.
  4. Choose Save.

YouTube

YouTube keys turn on YouTube as a music source.

  1. In the Google Cloud console, create a project or choose one.
  2. In the API Library of that project, enable the YouTube Data API v3.
  3. Open the credentials link on the card, and choose to create an OAuth client ID. Google may ask you to set up the OAuth consent screen first. The setup card gives no values for that screen, so this page cannot either: fill it in as Google asks, then go back to the credentials page.
  4. Choose the “Web application” type, add the address from the card as an Authorized redirect URI, and create the client.
  5. Paste the Client ID into Client ID, and the Client secret into Client Secret.
  6. Choose Save.

6. Finish setup

The last card lists every step with Done or Not set. Below the list is a box titled Event feed. For a signed-in streamer, it checks that Twitch events such as follows, raids and subs reach the bot. Nobody has signed in to a new bot yet, so the box shows only “Sign in after you finish setup. Then this page can check that Twitch events reach the bot.” It has no button, and you need nothing from it to finish.

Choose the Finish setup button. The bot leaves the setup page for the dashboard and asks you to sign in. Sign in as the broadcaster to connect your channel. If you chose the shared app in step 1, choose Sign in with a code instead on the sign-in page.

Once the Twitch app step is done, you can sign in even if you leave before you choose the Finish setup button. The keys then stay open to anyone. To come back, sign out of the dashboard first: open the account menu at the bottom of the sidebar and choose Sign out. Then open <bot address>/setup.

Troubleshooting

When something is not right

The page says “This bot does not answer. Check that it runs, then try again.” The browser cannot reach the bot. Check that the bot runs, as described in Install with Docker, then choose Try again.

When something is not right

Next stays off on the Twitch app step. The step needs one of its two choices. See 1. Twitch app.

When something is not right

Saving shows “The bot could not save this. Check the values and try again.” Check the values you pasted. If the setup is already finished, only an admin of the bot can save new keys.

When something is not right

The bot account step shows “The bot could not start the authorization. Try again.” The bot has no Twitch Client Secret saved, for example because you chose the shared app. Go back to step 1, save your own app with its secret, or choose Skip on this step. If the setup is already finished, only an admin of the bot can authorize the bot account.

When something is not right

The bot account card keeps waiting after you approve on Twitch. The bot did not accept the approval. Twitch may have failed to hand over the approval. Choose Authorize the bot account again. The bot may already have a different bot account. Approve on Twitch with that same account instead.

When something is not right

The Finish setup button shows “The bot could not finish setup. Try again.” Choose the Finish setup button again. If the setup was already finished from another browser, only an admin of the bot can finish it again.