@kody/producthunt
Read today's Product Hunt posts, lookups, and comments through the saved Product Hunt OAuth integration.
IntegrationsTopics: producthunt, product-hunt, graphql, oauth, posts, hunts, comments, dry-run
- Version
- 1.0.0
- License
- MIT
- Published
- September 10, 2026
- Pinned commit
bfffed9- Rating
- No ratings yet
- Forks
- 0
- Adaptation effort
- —
README
Agent docs@kody/producthunt
Intent
Give any Kody account reusable Product Hunt helpers for today’s posts,
lookups (posts, hunters, topics, collections), and comments as allowed by
the Product Hunt API. The public GraphQL schema can read comments; it does
not expose a comment-create mutation. Writes that are in the schema (goals
and follow/unfollow) go through ./request with dryRun: true / confirm: true.
This listing is meant to be forked. After you fork, connect your Product
Hunt app or developer token and run ./smoke-test on your copy. Do not
treat the live @kody/producthunt integration as yours.
Share this package as https://kody.codes/@kody/producthunt
(never a /community/{listing_id} URL).
What it does
- List today’s featured hunts without writing GraphQL by hand
- Look up a post, hunter, topic, or collection by id or slug
- Read comments on a post (
./list-comments) - Call an unwrapped Product Hunt GraphQL operation through
./request - Verify credentials with
./smoke-testbefore building workflows
Do not use this package as a scraper, a place to paste access tokens, or a comment poster — Product Hunt’s public API does not expose comment writes.
Prerequisites / setup
Product Hunt has no built-in Kody OAuth app. Tokens come from a bring-your-own confidential OAuth app or a developer token saved as a user secret. Never paste a client secret or access token into chat.
Required API host: api.producthunt.com. Approve it in the account
secrets UI. Saving a secret does not approve hosts by itself.
| Lane | When to use | Credential |
|---|---|---|
| OAuth (recommended) | Connected hunter (viewer), private fields, refreshable tokens | Saved integration producthunt or producthunt-<purpose> |
| Developer token | Public reads when you only have a dashboard token | User secret producthuntAccessToken (or producthuntAccessToken-<purpose>) |
Lane A — BYO OAuth
- Create a Confidential OAuth app at Product Hunt API applications. Public clients cannot store the secret Kody needs.
- Register the redirect URI exactly as
https://kody.codes/connect/oauth. - Request scopes
publicandprivate(space-separated). Addwriteonly when Product Hunt has approved your app for mutations. - Open this prefilled connect URL while signed in to Kody:
https://kody.codes/connect/oauth?provider=producthunt&authorizeUrl=https%3A%2F%2Fapi.producthunt.com%2Fv2%2Foauth%2Fauthorize&tokenUrl=https%3A%2F%2Fapi.producthunt.com%2Fv2%2Foauth%2Ftoken&apiBaseUrl=https%3A%2F%2Fapi.producthunt.com%2Fv2%2Fapi%2Fgraphql&flow=confidential&allowedHosts=api.producthunt.com&dashboardUrl=https%3A%2F%2Fapi.producthunt.com%2Fv2%2Foauth%2Fapplications&scopes=public%20private
- Paste the Client ID and Client Secret into the Kody form (not into chat). If you need to save the client secret yourself first:
https://kody.codes/account/secrets/new?name=producthuntClientSecret&description=Product%20Hunt%20OAuth%20client%20secret%20for%20the%20confidential%20app&allowedHosts=api.producthunt.com&scope=user
- Approve host
api.producthunt.com. - Reconnect later with https://kody.codes/connect/oauth?provider=producthunt
Decoded connect fields:
- Redirect / callback:
https://kody.codes/connect/oauth - Authorize:
https://api.producthunt.com/v2/oauth/authorize - Token:
https://api.producthunt.com/v2/oauth/token - API:
https://api.producthunt.com/v2/api/graphql - Flow:
confidential - Host:
api.producthunt.com - Scopes:
public,private
To connect a second account, change provider (for example
provider=producthunt-work) and pass account: 'work' or
integrationName: 'producthunt-work' on every call.
Lane B — Developer / access token
- Create or copy a developer token from the same API applications page.
- Save it (do not paste the value in chat):
https://kody.codes/account/secrets/new?name=producthuntAccessToken&description=Product%20Hunt%20developer%20or%20OAuth%20access%20token%20for%20GraphQL%20reads&allowedHosts=api.producthunt.com&scope=user
- Approve host
api.producthunt.com. - For a second token use
producthuntAccessToken-workand passsecretName: 'producthuntAccessToken-work'(oraccount: 'work').
Scopes
| Scope | Needed for |
|---|---|
public | Featured posts, lookups, comments, topics, collections |
private | ./get-viewer (viewer.user) |
write | Goal and follow mutations via ./request (Product Hunt must approve the app) |
Mutation safety (summary)
The public schema’s mutations are goals and user follow/unfollow — not
comments. ./request treats query documents as read-only. Mutation documents
need confirm: true. Pass dryRun: true to inspect the payload without
calling Product Hunt.
Agents: see AGENTS.md for import paths, smoke checks, and
GraphQL snippets.
Done when
producthuntOAuth is connected (public+private) orproducthuntAccessTokenis saved; hostapi.producthunt.comis approved- Smoke test returns
{ ok: true, live: true, hasViewer, todayPostCount }without hunter PII, or{ live: false }plus setup URLs - Mutations via
./requestpreview withdryRun: trueand only run live withconfirm: trueafter Product Hunt has approvedwritewhen needed
Docs
Report this listing
Log in to report this listing.