OAuth Client Only Authentication

oauth#test - Accessing user-level fields with just a client level token will lead to default values (false, nil in most cases)

If you are trying to access user level content for e.g `is_voted` field on PostType, you will always get default values in the response (false in this case).

Request

Route

GET /v2/api/graphql

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer your_access_token
Host: api.producthunt.com

Body

{
  "query": "query { posts(first: 1) { edges { node { isVoted } } }, viewer { user { username } } }"
}

Response

Status

200 OK

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Rate-Limit-Limit: 900
X-Rate-Limit-Remaining: 900
X-Rate-Limit-Reset: 900
Cache-Control: no-store
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Content-Length: 267

Body

{
  "data": {
    "posts": {
      "edges": [
        {
          "node": {
            "id": 139993,
            "name": "Parla X"
          }
        }
      ]
    },
    "viewer": null
  }
}