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" : "e2a1a3259b4e13eb324bed61340b546664670e648a62d7d36e59cad11e394db7",
  "client_secret" : "ba2ab029005f6468580b52e0c5e3a558f327a15749fd3475351a256fc013d259",
  "grant_type" : "client_credentials"
}

Response

Status

200 OK

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: no-store
Pragma: no-cache
Content-Type: application/json; charset=utf-8
ETag: W/"aa9e9d1fc69a62e934e4a2268ac0e69f"
Content-Length: 122

Body

{
  "access_token" : "ffd2827fa5ad5327158bd180072f772f56ae406a17be571293d5db63cbb29f30",
  "token_type" : "bearer",
  "scope" : "public"
}