-
Notifications
You must be signed in to change notification settings - Fork 9
Setting Up API Keys
Kory edited this page Jul 30, 2019
·
3 revisions
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=
# 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=
Get your Reddit authentication keys by following these steps.
- Create a Reddit account
- Go to your App preferences
- Pressing "create app"
- Filling in a name and other details
- name: 'talk-generator', 'script', description: 'talk-generator', about url: 'https://github.com/korymath/talk-generator', redirect url: 'https://github.com/korymath/talk-generator'
- Open
.env
- Fill in the
REDDIT_CLIENT_ID
above using the id under the name of the app, theREDDIT_CLIENT_SECRET
using the text next tosecret
in the app card.
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.
You can create this file by following the next steps:
- Create a Wikihow account.
- Open
.env
- Fill in
WIKIHOW_USERNAME
with your username, andWIKIHOW_PASSWORD
with your password.
TODO(korymath)