Skip to content

Make a dotenv file

hieyou1 edited this page Jun 18, 2021 · 1 revision

Create a Twitch Developer application

  1. Login and create a new app in the Twitch Developer console.

  2. Set a good name for your app [can be anything], and set the "OAuth Redirect URLs" to http://localhost:3005 [replace "localhost" with an IP of an external server, if applicable]

  3. Pick "Broadcaster Suite" as the category, solve the CAPTCHA if you have one, and click "Create".

  4. Go to the list of your apps, go into "Manage" for the app you made, and copy down the Client ID. You'll need this later.

  5. Click "New Secret" to make a new Client Secret. You'll also need this later.

  6. Click "Save" on the bottom if necessary, and go back to the Streamsaver directory to continue.

Create the .env file with the credentials

  1. Use a text editor or IDE to create a file called .env in the project directory.

  2. In this file, type client_id= and paste in your Client ID from earlier.

  3. Make a new line [press "Enter" or "Return"], type client_secret= and paste in your Client Secret from earlier.

  4. Save the file as .env. Be sure to remove any auto-added file extension, such as .txt. The entire file name should be .env.

  5. Restart your Node.js instance by pressing Control-C ^C and typing node . again.