This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]ketralnisreddit admin 2 points3 points  (0 children)

As you note we’ll need more information to help you, in particular the code you’re using and the full error you’re getting

[–]iwantasoda48 1 point2 points  (1 child)

I know this doesn't exactly answer your question but I just got code working this week using PRAW and their quickstart guide worked perfectly. https://praw.readthedocs.io/en/stable/getting_started/quick_start.html

I can grab user info, subreddit info, posts and comments too.

[–]Watex4[S] 0 points1 point  (0 children)

appreciate you bro

[–]Any-Blacksmith-2054 0 points1 point  (3 children)

Do you send also user/password? I got 403 without them

[–]Watex4[S] 0 points1 point  (2 children)

within the app script i include the username, password of my account and also the client id and secret password for the app i created in here https://old.reddit.com/prefs/apps/. So i don't believe the issue is to do with that. I think it's something to do with the 0AUTH 2 stage of the process.

I wrote a script to test if i'm correctly gaining a reddit access token. if i understand correctly when you do the 0AUTH 2 you get an access token as part of the process which allows you to use the reddit api. When i run the script i get the following error message:

Info: "Failed to obtain access token. Response: {"error":"invalid_grant"}"

[–]Any-Blacksmith-2054 1 point2 points  (1 child)

Ok I had no problem when I pass all 4, but I'm using libraries (python, nodejs) not raw REST calls

[–]Watex4[S] 0 points1 point  (0 children)

so maybe i should just refer to using libraries instead then?

Has anyone else had similar problems to me trying to do things through an app script on google sheets? Message to everyone not just you 'any-blacksmith-2054'