This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi there, one of my scripts I use which allows users to pin a comment on their post using a command is no longer working for me. This script worked fine for months now but in the last 2 weeks I keep getting a "prawcore.exceptions.ResponseException: received 401 HTTP response" error and the script refuses to work. All credientials are fine, the account is not suspended. I even tried to run the script through another account and same error
Here is the console in detail
Here is my code. My config file with the creditals are in the same folder that the script runs
I hope I am in the right place for help. This has been very frustrating to fix. Hopefully it is an easy solution
Edit: codeblock isn't working for me so resorted to pastebin
I'm not familiar with PRAW specifically, but I ran into an issue a few weeks ago that sounds similar - I started getting 403's on an endpoint (https://www.reddit.com/dev/api/#GET_about_moderators in particular)
I was doing some tinkering to try to figure out why I was only getting 600 requests per 600 seconds based on the rate limiting headers I was seeing, rather than the 1000/600 I expected. I ran into some mentions here that it was related to the tokens being used, oauth/app type/user auth etc.. I don't remember the details at this point, I never figured out a way to see a 1000/600 rate limit no matter what way I configured the token requests.
But what I did run into was that some of the requests I had been making for well over a year now were failing with 403's and it was only after changing the `grant_type` from `password` to `client_credentials`.
So, seeing that you haven't had any feedback here yet - maybe take a look at the token's `grant_type` in your auth flow and see if you can tinker with that to get a different response. (Note, if you're going to use `password` you'll need to pass a `username` and `password` alongside the `grant_type` in the request, presumably that user/pass combo needs to be the one that owns the reddit app.
All of this comes with a disclaimer that I'm using a janky PHP client that hasn't been updated in some time and isn't even remotely close to being as solid as PRAW, so it could be that my client/lib has its own issues in the token/oauth flow and none of this is related, but it's worth a try :D
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/redditdev/c...