- Welcome to the API
- OAuth User Authentication
- OAuth Client Only Authentication
- Posts
- Users
- Collections
- Comments and Comment Threads
- Notifications
- Voting for posts
- Settings
- Followers & Followings
- Current user
- Subscribe to collections
- Shareable Images
- Topics
- Rate Limits
API V1 is deprecated, Check out new API V2 here
OAuth Client Only Authentication
oauth#token - Ask for client level token
If you want to access our API without any user context this is the right authentication for you.
Typical usecases might be your mobile app that wants to show the current posts to not-yet-logged-in users.
Parameters
Name | Description |
---|---|
client_id required | The id of your application |
client_secret required | The secret of your application |
grant_type required | use `client_credentials` |
Request
Route
POST /v1/oauth/token
Headers
Accept: application/json Content-Type: application/json Host: api.producthunt.com
Body
{ "client_id": "h_juvfef-tN1rFwQPW5FCrs51KvwYzmlMHtg-_EGE7g", "client_secret": "SPThS9bchkryYKY19SH4S8LA_0zS_dnrqHwQiCbxwZ0", "grant_type": "client_credentials" }
Response
Status
200 OK
Headers
Cache-Control: no-store Pragma: no-cache Content-Type: application/json; charset=utf-8 ETag: W/"b9270ecdfc87caa0efaeac35b772e336" Content-Length: 125
Body
{ "access_token": "guQkyRMmCFLemTOitpgUTNnaa_OT5DvscYfLrl0IAaA", "token_type": "Bearer", "scope": "public", "created_at": 1620214744 }