Im trying to learn PRAW
. Doing everything according to official documentations but start getting login error (output below)
What do I wrong? How can I fix that? All creds
are correct.
import json
import praw
import requests
subr = 'test'
credentials = 'client_secrets.json'
with open(credentials) as f:
creds = json.load(f)
reddit = praw.Reddit(client_id=creds['client_id'],
client_secret=creds['client_secret'],
user_agent=creds['user_agent'],
redirect_uri=creds['redirect_uri'],
pasword=creds['password'],
username=creds['username'])
title = "PRAW documentation"
url = "https://praw.readthedocs.io"
reddit.subreddit("test").submit(title, url=url)
Output:
RedditAPIException: USER_REQUIRED: 'Please log in to do that.'
source https://stackoverflow.com/questions/74174099/how-to-login-in-praw
Comments
Post a Comment