Post text or comment to Reddit / subreddit community

Hello,

I have obtained the oAuth from Reddit and able to GET info according to the APIs of them.
Do anyone know how to POST text or comment?
I couldn’t make happened and the info on the developer page is unclear or maybe can’t make with Postman?

Thank you

Hey @CryptoAngel

Can you share your POST request and the documentation you’re following please?

Thank you for trying to help.
Please see this https://www.reddit.com/dev/api#POST_api_site_admin

I think your problem is the API you’re trying to use. My guess is that you aren’t a site admin, so the api you linked will not work for you.

If you want to add a comment, here is the documentation for that API.

If you want to submit a new link, here is the documentation for that API.

Thank you for your comment.
I don’t need to be site admin to use the API, I have oAuth key which Reddit issued to me.
According to the link you’ve sent, I don’t understand how to use it on Postman, and that’s what I’ve asked here in first place.

REST APIs use json payloads in the request body. These payloads are nothing more than a key value pair. According to the documentation, to add a comment you need two key/values:

{
    "parent": "<identifier for the entity you are commenting on>",
    "text": "<markdown of the comment you want to add>"
}

If I had to guess, I would say that this is the id of a post

So putting that in Postmtan might look like this

Thank you so much for your effort to find the solution.
Something is missing, since the way you suggested anyone can post a comment to Reddit. Ether needs to be signin before or have the oAuth key as part of the URL. I tried your suggested but it doesn’t work ;-(

1 Like

You need to add your authorization token in the Authorization tab.

Or you can do whatever you did for your GET that is working.

If it’s adding a query parameter, then add a query parameter to the url