Coming soon - Get a detailed view of why an account is flagged as spam!
view details

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.

3
Enabling 2 Factor Auth for my account breaks OAuth access_code requests
Post Body

I'm not sure if this is a bug per se or if I am doing something incorrectly. Normally in the past, I retrieve a token via https://www.reddit.com/api/v1/access_token with a grant_type of "password" and use my app's client_id and client_secret to create the Basic authorization header. Everything works as expected and I receive a token.

However, if I enable 2-Factor authentication for my account, the code that retrieves a token fails with this message:

{'error': 'invalid_grant'}

Should I use a different grant_type if I have 2-Factor authentication enabled on my account? Is there any other change I need to make for token generation to work correctly with MFA?

Thank you!

Author
Account Strength
100%
Account Age
11 years
Verified Email
No
Verified Flair
No
Total Karma
143,730
Link Karma
34,810
Comment Karma
108,242
Profile updated: 3 days ago
Posts updated: 6 months ago
Pushshift.io data scientist

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 years ago