Skip to content

Setting Up API Keys

Kory edited this page Mar 25, 2020 · 3 revisions

Setting up Required API Keys

Our program relies on certain APIs that require authentication in order to use it. Create a file named .env (don't forget the period) in your project directory.

# Reddit Authentication
REDDIT_CLIENT_ID=
REDDIT_CLIENT_SECRET=
REDDIT_USER_AGENT="" #use quotes here

# Wikihow Authentication
WIKIHOW_USERNAME=
WIKIHOW_PASSWORD=

# Unsplash Authentication
UNSPLASH_ACCESS_KEY=
UNSPLASH_SECRET_KEY=
UNSPLASH_REDIRECT_URI=
UNSPLASH_CODE=

PIXABAY_KEY=
PEXELS_KEY=

# OPTIONAL: If you want to save to Amazon S3, define your params here
AWS_TALK_BUCKET_KEY=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=

Reddit authentication: Getting your keys

Get your Reddit authentication keys by following these steps.

The REDDIT_USERAGENT can be set to "python:https://github.com/korymath/talk-generator:v0.0.1 by /u/REDDIT_USERNAME)" and replace the REDDIT_USERNAME with your Reddit username.

Wikihow authentication: Getting your keys

You can create this file by following the next steps:

  • Create a Wikihow account.
  • Open .env
  • Fill in WIKIHOW_USERNAME with your username, and WIKIHOW_PASSWORD with your password.

Unsplash authentication

Go to https://unsplash.com/developers to request your Unsplash API key.

Pexels authentication

Go to https://www.pexels.com/api/ to request your Pexels API key.

Pixabay authentication

Go to https://pixabay.com/api/docs/ to request your Pixabay API key.