Getting a 302 response when trying to list messages
### Describe the Bug
We're receiving a 302 response when trying to list direct messages via `reddit.inbox.messages()`.
This used to work, but it may have been broken when Reddit introduced the new Reddit Chat. 🤷♂️
~As an alternative, we tried using `reddit.inbox.all()`, but it seems like it won't return any Messages, only Comments.~
**PS:** I'm sorry if this is not a `praw` bug, but rather a Reddit API issue. I am just trying to learn more about this issue.
### Desired Result
Return the `Message` objects.
### Code to reproduce the bug
```Python
reddit = praw.Reddit(
client_id='<client_id>',
client_secret='<client_secret>',
user_agent='<user_agent>',
refresh_token='<refresh_token>'
)
reddit.inbox.messages(limit=25)
```
### My code does not include sensitive credentials
- [x] Yes, I have removed sensitive credentials from my code.
### Relevant Logs
```Shell
prawcore.exceptions.Redirect: Redirect to /login/ (You may be trying to perform a non-read-only action via a read-only instance.)
```
### This code has previously worked as intended
Yes
### Operating System/Environment
macOs Sequoia 15.6.1
### Python Version
3.11.13
### PRAW Version
7.8.1
### Links, references, and/or additional comments?
Looks like this has been discussed before here, but the user was authenticating via username/password instead: https://github.com/praw-dev/praw/issues/2077
关闭于 2025-09-12 5 条评论