Reddit Upvted post

Trying to get upvoted posts from my own account on reddit.

{"status":"rejected","reason":{"context":{},"name":"NodeApiError","cause":{"message":"403 - {\"message\":\"Forbidden\",\"error\":403}","name":"Error","stack":"Error: Request failed with status code 403\n    at createError (/home/dovahkiin93/.npm-global/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/home/dovahkiin93/.npm-global/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/home/dovahkiin93/.npm-global/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (events.js:412:35)\n    at endReadableNT (internal/streams/readable.js:1333:12)\n    at processTicksAndRejections (internal/process/task_queues.js:82:21)"},"timestamp":1661606381471,"message":"Forbidden - perhaps check your credentials?","node":{"parameters":{"authentication":"predefinedCredentialType","nodeCredentialType":"redditOAuth2Api","requestMethod":"GET","url":"http://www.reddit.com/dev/user/dovahkiin937425/upvoted","allowUnauthorizedCerts":false,"responseFormat":"json","jsonParameters":false,"options":{},"headerParametersUi":{},"queryParametersUi":{}},"id":"75b73651-46e4-4413-9c5a-bbb5d6a89593","name":"HTTP Request","type":"n8n-nodes-base.httpRequest","typeVersion":2,"position":[20,440],"credentials":{"redditOAuth2Api":{"id":"18","name":"Dovahkiin937425"},"oAuth2Api":{"id":"19","name":"Reddit Test"}}},"httpCode":"403","description":"403"}}

Please share the workflow

Any ideas how to get this done?

Hi @dovahkiin93, it seems you’re trying to open a Reddit website using OAuth2 API credentials. The website would use a different authentication method. Can you try sending your request to https://oauth.reddit.com/user/dovahkiin937425/upvoted instead? This seems to be the endpoint you’re looking for as per Reddit’s API documentation.

That worked. Thanks for your help!

1 Like

Sweet, thanks so much for confirming!