Connect
List Reddit subreddits
Returns the subreddits the connected Reddit account can post to. Use this to get a subreddit name when creating a Reddit post.
Authorization
bearerAuth AuthorizationBearer <token>
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
accountId*string
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.getRedditSubreddits({ path: { accountId: 'account_abc123', },});console.log(data);{ "subreddits": [ { "id": "2qh1i", "name": "marketing", "title": "Marketing", "url": "/r/marketing/", "over18": false }, { "id": "2qh3l", "name": "socialmedia", "title": "Social Media", "url": "/r/socialmedia/", "over18": false } ], "defaultSubreddit": "marketing"}Was this page helpful?