### GraphQL Request Headers Source: https://api.producthunt.com/v2/docs/rate_limits/headers Example headers for a GraphQL POST request to the Product Hunt API. Ensure 'Authorization' is set to your access token. ```http Accept: application/json Content-Type: application/json Authorization: Bearer your_access_token Host: api.producthunt.com ``` -------------------------------- ### GraphQL Request Body Source: https://api.producthunt.com/v2/docs/rate_limits/headers Example JSON body for a GraphQL POST request, specifying the query to be executed. ```json { "query": "query { posts(first: 1) { edges { node { id, name } } } }" } ``` -------------------------------- ### GraphQL Response Headers Source: https://api.producthunt.com/v2/docs/rate_limits/headers Example response headers for a GraphQL request, including rate limit information. 'X-Rate-Limit-Limit', 'X-Rate-Limit-Remaining', and 'X-Rate-Limit-Reset' indicate the current rate limit status. ```http X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Rate-Limit-Limit: 6250 X-Rate-Limit-Remaining: 6010 X-Rate-Limit-Reset: 850 Content-Type: application/json; charset=utf-8 Cache-Control: max-age=0, private, must-revalidate Content-Length: 12 ``` -------------------------------- ### OAuth Token Response Headers Source: https://api.producthunt.com/v2/docs/rate_limits/headers Example response headers for an OAuth token request. Note the presence of rate limit headers: 'X-Rate-Limit-Limit', 'X-Rate-Limit-Remaining', and 'X-Rate-Limit-Reset'. ```http X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Rate-Limit-Limit: 900 X-Rate-Limit-Remaining: 899 X-Rate-Limit-Reset: 850 Content-Type: application/json; charset=utf-8 Cache-Control: max-age=0, private, must-revalidate Content-Length: 12 ``` -------------------------------- ### Product Hunt API GraphQL Query Body Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/unauthorized_oauth_oauth_test_invalid_access_tokens_will_lead_to_error_messages Example GraphQL query body. Invalid access tokens will prevent this query from executing successfully. ```json { "query": "query { viewer { user { username } } }" } ``` -------------------------------- ### GraphQL Rate Limit Headers Source: https://api.producthunt.com/v2/docs/rate_limits/headers This section shows an example of the rate limit headers returned for the GraphQL endpoint. The application has a quota of 6250 complexity points for every 15 minutes. ```APIDOC ## POST /v2/api/graphql ### Description This endpoint is used for GraphQL queries and is subject to complexity-based rate limiting. ### Method POST ### Endpoint /v2/api/graphql ### Request Headers ``` Accept: application/json Content-Type: application/json Authorization: Bearer your_access_token Host: api.producthunt.com ``` ### Request Body ```json { "query": "query { posts(first: 1) { edges { node { id, name } } } }" } ``` ### Response Headers ``` X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Rate-Limit-Limit: 6250 X-Rate-Limit-Remaining: 6010 X-Rate-Limit-Reset: 850 Content-Type: application/json; charset=utf-8 Cache-Control: max-age=0, private, must-revalidate Content-Length: 12 ``` ### Response Body ```json { "data": { "posts": { "edges": [ { "node": { "id": 139993, "name": "Parla X" } } ] } } } ``` ``` -------------------------------- ### General API Rate Limit Headers Source: https://api.producthunt.com/v2/docs/rate_limits/headers This section shows an example of the rate limit headers returned for other API endpoints. The application can make up to 450 requests every 15 minutes. ```APIDOC ## GET /v2/oauth/token ### Description This endpoint is used for OAuth token requests and is subject to request-based rate limiting. ### Method GET ### Endpoint /v2/oauth/token ### Request Headers ``` Accept: application/json Content-Type: application/json Authorization: Bearer your_access_token Host: api.producthunt.com ``` ### Response 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: 899 X-Rate-Limit-Reset: 850 Content-Type: application/json; charset=utf-8 Cache-Control: max-age=0, private, must-revalidate Content-Length: 12 ``` ### Response Body ```json { "posts": [] } ``` ``` -------------------------------- ### POST Request with Authorization Header Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_test_add_the_access_token_as_header_to_any_request This example demonstrates how to make a POST request to the Product Hunt API's GraphQL endpoint, including the 'Authorization' header with a bearer token. Ensure 'application/json' headers are used for proper request handling. ```http POST /v2/api/graphql Accept: application/json Content-Type: application/json Authorization: Bearer your_access_token Host: api.producthunt.com { "query": "query { viewer { user { username } } }" } ``` -------------------------------- ### GraphQL Response with Default Values Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/unauthorized_oauth_oauth_test_invalid_access_to_user-level_content_with_just_an_client_level_token_will_lead_to_errors This is an example response to a GraphQL query made with a client-level token. Note that the 'viewer' field is null, and user-specific fields within 'posts' would return default values. ```json { "data": { "posts": { "edges": [ { "node": { "id": 139993, "name": "Parla X" } } ] }, "viewer": null } } ``` -------------------------------- ### Successful API Response Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_test_add_the_access_token_as_header_to_any_request This is an example of a successful response (200 OK) from the Product Hunt API after making an authenticated GraphQL request. It includes response headers and the JSON body containing the requested data. ```http 200 OK 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 ETag: "5e5a5c086082754f885464d04fc11842" Content-Type: application/json; charset=utf-8 Cache-Control: max-age=0, private, must-revalidate Content-Length: 3672 { "data": { "viewer": { "user": { "username": "testuser" } } } } ``` -------------------------------- ### OAuth Authorization Request Route Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_authorize_ask_for_access_grant_code_on_behalf_of_the_user This is the GET request route used to initiate the OAuth authorization flow. Redirect your users to this endpoint to ask for an access grant code. ```http GET /v2/oauth/authorize?client_id=6b470306b04d50cdd028b5c6922f84d91ff0c3e617c8164ae0e04b03d6ebd655&redirect_uri=http%3A%2F%2Fexample.org%2F&response_type=code&scope=public+private ``` -------------------------------- ### Use Client-Level Token for Read API Access (GraphQL) Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/oauth_test_use_the_client_level_token_for_read_api_access Access public API endpoints using a client-level access token. Ensure the 'Authorization' header is correctly set with your token. This example demonstrates a GraphQL query. ```http POST /v2/api/graphql Accept: application/json Content-Type: application/json Authorization: Bearer your_access_token Host: api.producthunt.com ``` ```json { "query": "query { posts(first: 1) { edges { node { id, name } } } }" } ``` -------------------------------- ### OAuth User Authentication - Test Source: https://api.producthunt.com/v2/docs Demonstrates how to test authentication by adding the access token to requests. ```APIDOC ## oauth#test ### Description Add the access_token as a header to any request to test authentication. ### Method GET ### Endpoint /api/v2/graphql ### Headers - **Authorization** (string) - Required - Example: Bearer {access_token} ``` -------------------------------- ### oauth#authorize - Ask for access grant code on behalf of the user Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_authorize_ask_for_access_grant_code_on_behalf_of_the_user Redirect your users to this endpoint to initiate the OAuth authorization flow. After successful login and authorization, Product Hunt will redirect the user back to your specified `redirect_uri` with an access grant code. ```APIDOC ## GET /v2/oauth/authorize ### Description This endpoint is used to initiate the OAuth 2.0 authorization code grant flow. It redirects the user to Product Hunt to log in and authorize your application, after which they are redirected back to your application with an authorization code. ### Method GET ### Endpoint /v2/oauth/authorize ### Parameters #### Query Parameters - **client_id** (string) - Required - The client ID of your application. - **redirect_uri** (string) - Required - The URI to which Product Hunt will redirect the user after authorization. - **response_type** (string) - Required - Specifies the grant type. Use `code` for the authorization code grant. - **scope** (string) - Required - Defines the level of access your application requires. Examples: `public`, `public private`, `public private write`. ### Request Example ``` https://api.producthunt.com/v2/oauth/authorize?client_id=[clientid]&redirect_uri=[where shall we redirect to?]&response_type=code&scope=public+private ``` ### Response #### Success Response (200 OK) This endpoint typically returns an HTML page for the user to interact with Product Hunt's login and authorization screens. The actual authorization code is passed as a query parameter (`code`) in the redirect to your `redirect_uri`. #### Response Example (Redirect) Upon successful authorization, the user's browser will be redirected to a URL similar to this: ``` http://example.org/?code=AUTHORIZATION_CODE_HERE ``` ``` -------------------------------- ### oauth#test - Add the access_token as header to any request Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_test_add_the_access_token_as_header_to_any_request This endpoint demonstrates how to add the `Authorization` header with a Bearer token to your requests for user authentication. It also provides guidance on setting `Content-Type` and `Accept` headers. ```APIDOC ## POST /v2/api/graphql ### Description Add the `Authorization` header to every request with your `access_token`. ### Method POST ### Endpoint /v2/api/graphql ### Headers - **Accept**: application/json - **Content-Type**: application/json - **Authorization**: Bearer your_access_token - **Host**: api.producthunt.com ### Request Body - **query** (string) - Required - The GraphQL query to execute. ### Request Example ```json { "query": "query { viewer { user { username } } }" } ``` ### Response #### Success Response (200 OK) - **data** (object) - The response data from the GraphQL query. #### Response Example ```json { "data": { "viewer": { "user": { "username": "testuser" } } } } ``` ``` -------------------------------- ### GraphQL API Endpoint Source: https://api.producthunt.com/v2/docs The main endpoint for interacting with the Product Hunt API v2 using GraphQL. ```APIDOC ## GraphQL API ### Description Access Product Hunt data via a simple GraphQL interface. ### Endpoint https://api.producthunt.com/v2/api/graphql ### Authentication Requires an `access_token` in the `Authorization` header: `Authorization: Bearer {token}` ``` -------------------------------- ### oauth#test - Invalid access to user-level content with just a client level token Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/unauthorized_oauth_oauth_test_invalid_access_to_user-level_content_with_just_an_client_level_token_will_lead_to_errors Demonstrates how attempting to access user-level content with only a client-level token results in default values (e.g., false, null) for those fields. This is useful for understanding the limitations of client-only authentication when user-specific data is required. ```APIDOC ## 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 ```json { "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 ```json { "data": { "posts": { "edges": [ { "node": { "id": 139993, "name": "Parla X" } } ] }, "viewer": null } } ``` ``` -------------------------------- ### OAuth Client Only Authentication - Test Source: https://api.producthunt.com/v2/docs Demonstrates using a client-level token for read-only API access. ```APIDOC ## oauth#test (Client Only) ### Description Use the client level token for read API access. Invalid access to user-level content with just a client level token will lead to errors. ### Method GET ### Endpoint /api/v2/graphql ### Headers - **Authorization** (string) - Required - Example: Bearer {client_token} ``` -------------------------------- ### OAuth Authorization Request Headers Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_authorize_ask_for_access_grant_code_on_behalf_of_the_user These are the required headers for the OAuth authorization request. Ensure the Host header is set correctly to api.producthunt.com. ```http Host: api.producthunt.com ``` -------------------------------- ### oauth#test - Use the client level token for read api access Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/oauth_test_use_the_client_level_token_for_read_api_access This endpoint allows you to access public endpoints that do not require user context by using a client-level access token. It demonstrates a GraphQL query to fetch post data. ```APIDOC ## POST /v2/api/graphql ### Description Use the client level token for read api access. You can use the client level access token to access public endpoints that don't need user context. ### Method POST ### Endpoint /v2/api/graphql ### Headers - **Accept**: application/json - **Content-Type**: application/json - **Authorization**: Bearer your_access_token - **Host**: api.producthunt.com ### Request Body - **query** (string) - Required - The GraphQL query to execute. ### Request Example ```json { "query": "query { posts(first: 1) { edges { node { id, name } } } }" } ``` ### Response #### Success Response (200 OK) - **data** (object) - The response data containing the results of the GraphQL query. #### Response Example ```json { "data": { "posts": { "edges": [ { "node": { "id": 139993, "name": "Parla X" } } ] } } } ``` ``` -------------------------------- ### Product Hunt API GraphQL Route Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/unauthorized_oauth_oauth_test_invalid_access_tokens_will_lead_to_error_messages This is the route used for GraphQL queries. Ensure your access token is valid to avoid authorization errors. ```http POST /v2/api/graphql ``` -------------------------------- ### OAuth User Authentication - Authorize Source: https://api.producthunt.com/v2/docs Initiates the OAuth flow to ask for an access grant code on behalf of the user. ```APIDOC ## oauth#authorize ### Description Ask for access grant code on behalf of the user. ### Method GET ### Endpoint /oauth/authorize ``` -------------------------------- ### Product Hunt API Request Headers Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/unauthorized_oauth_oauth_test_invalid_access_tokens_will_lead_to_error_messages Standard headers required for API requests. The 'Authorization' header with a valid Bearer token is crucial for authenticated access. ```http Accept: application/json Content-Type: application/json Host: api.producthunt.com ``` -------------------------------- ### Request Client Level Token Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/oauth_token_ask_for_client_level_token Use this endpoint to obtain a client-level access token. This is required for accessing the API without user context. Ensure you provide your application's client ID, client secret, and set the grant type to 'client_credentials'. ```json { "client_id": "e2a1a3259b4e13eb324bed61340b546664670e648a62d7d36e59cad11e394db7", "client_secret": "ba2ab029005f6468580b52e0c5e3a558f327a15749fd3475351a256fc013d259", "grant_type": "client_credentials" } ``` -------------------------------- ### Product Hunt API Unauthorized Response Headers Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/unauthorized_oauth_oauth_test_invalid_access_tokens_will_lead_to_error_messages Response headers for an unauthorized request, including WWW-Authenticate details about the invalid token. ```http X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Cache-Control: no-store Pragma: no-cache WWW-Authenticate: Bearer realm="ProductHuntOauth2", error="invalid_token", error_description="The access token is invalid" Content-Type: application/json; charset=utf-8 Content-Length: 267 ``` -------------------------------- ### Request Access Token Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_token_use_the_access_grant_code_you_received_through_the_redirect_to_request_an_access_token Use the access grant code received through the redirect to request an access token. This endpoint requires your application's client ID, client secret, redirect URI, the grant type set to 'authorization_code', and the authorization code itself. ```APIDOC ## POST /v2/oauth/token ### Description Use the access grant code you received through the redirect to request an access token. Receive your access_token in the json response. ### Method POST ### Endpoint /v2/oauth/token ### Parameters #### Query Parameters - **client_id** (string) - Required - The id of your application - **client_secret** (string) - Required - The secret of your application - **redirect_uri** (string) - Required - Where shall we redirect the client afterwards to? - **grant_type** (string) - Required - use `authorization_code` - **code** (string) - Required - The access grant code you received via the callback from the previous step ### Request Example ```json { "client_id": "88e0b352f945d670875ea2d1483ac145bd3addba623053035da7db2cda4a5a90", "client_secret": "329567d3efde1413ab754411a2d61368715365682b68b48781b381196377aacc", "redirect_uri": "http://example.org/", "code": "cfdc933de78e0daf84e35bb8545c0d83d5c3e2424b307164fafd17b4e2772606", "grant_type": "authorization_code" } ``` ### Response #### Success Response (200) - **access_token** (string) - The obtained access token. - **token_type** (string) - The type of token, typically 'bearer'. #### Response Example ```json { "access_token": "e08bcc4a96dde0621d13f3cfea382853aa2d2ffec3f7894a28a9ed7c49857613", "token_type": "bearer" } ``` ``` -------------------------------- ### OAuth User Authentication - Token Source: https://api.producthunt.com/v2/docs Exchanges an access grant code for an access token. ```APIDOC ## oauth#token ### Description Use the access grant code you received through the redirect to request an access token. ### Method POST ### Endpoint /oauth/token ``` -------------------------------- ### OAuth Authorization Response Headers Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_authorize_ask_for_access_grant_code_on_behalf_of_the_user These headers are returned upon a successful OAuth authorization request. They include security headers and content information. ```http X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Content-Type: text/html; charset=utf-8 ETag: W/"73554857d650d89173a132a30b356691" Cache-Control: max-age=0, private, must-revalidate Content-Length: 2326 ``` -------------------------------- ### Response Body for Client Token Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/oauth_token_ask_for_client_level_token Upon successful request, the API returns a JSON object containing the access token, token type, and scope. This access token can then be used for authenticated API requests. ```json { "access_token": "ffd2827fa5ad5327158bd180072f772f56ae406a17be571293d5db63cbb29f30", "token_type": "bearer", "scope": "public" } ``` -------------------------------- ### Request Access Token using Authorization Code Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/oauth_token_use_the_access_grant_code_you_received_through_the_redirect_to_request_an_access_token Use this endpoint to exchange an authorization grant code for an access token. Ensure all required parameters are included in the request body. ```http POST /v2/oauth/token ``` ```http Accept: application/json Content-Type: application/json Host: api.producthunt.com ``` ```json { "client_id": "88e0b352f945d670875ea2d1483ac145bd3addba623053035da7db2cda4a5a90", "client_secret": "329567d3efde1413ab754411a2d61368715365682b68b48781b381196377aacc", "redirect_uri": "http://example.org/", "code": "cfdc933de78e0daf84e35bb8545c0d83d5c3e2424b307164fafd17b4e2772606", "grant_type": "authorization_code" } ``` ```json { "access_token": "e08bcc4a96dde0621d13f3cfea382853aa2d2ffec3f7894a28a9ed7c49857613", "token_type": "bearer" } ``` -------------------------------- ### OAuth Client Only Authentication - Token Source: https://api.producthunt.com/v2/docs Obtains a client-level token for read-only API access without user context. ```APIDOC ## oauth#token (Client Only) ### Description Ask for client level token. This token is limited to public endpoints that don't require user context. ### Method POST ### Endpoint /oauth/token ``` -------------------------------- ### GraphQL Request with Client-Level Token Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/unauthorized_oauth_oauth_test_invalid_access_to_user-level_content_with_just_an_client_level_token_will_lead_to_errors This snippet shows a GraphQL query to access post data and viewer information. When using a client-level token, user-specific fields like 'isVoted' will return default values, and 'viewer' will be null. ```http GET /v2/api/graphql Accept: application/json Content-Type: application/json Authorization: Bearer your_access_token Host: api.producthunt.com ``` ```json { "query": "query { posts(first: 1) { edges { node { isVoted } } }, viewer { user { username } } }" } ``` -------------------------------- ### OAuth Client Only Token Request Source: https://api.producthunt.com/v2/docs/oauth_client_only_authentication/oauth_token_ask_for_client_level_token This endpoint allows you to request a client-level access token. This is useful for applications that need to access the API without any user context, such as displaying current posts to non-logged-in users. ```APIDOC ## POST /v2/oauth/token ### Description This endpoint is used to obtain a client-level access token for accessing the Product Hunt API without user context. It is ideal for use cases like mobile apps displaying public data. ### Method POST ### Endpoint /v2/oauth/token ### Parameters #### Query Parameters - **client_id** (string) - Required - The id of your application. - **client_secret** (string) - Required - The secret of your application. - **grant_type** (string) - Required - Must be set to `client_credentials`. ### Request Body ```json { "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET", "grant_type": "client_credentials" } ``` ### Response #### Success Response (200 OK) - **access_token** (string) - The obtained access token. - **token_type** (string) - The type of token, usually "bearer". - **scope** (string) - The scope granted to the token, typically "public". #### Response Example ```json { "access_token": "ffd2827fa5ad5327158bd180072f772f56ae406a17be571293d5db63cbb29f30", "token_type": "bearer", "scope": "public" } ``` ``` -------------------------------- ### Unauthorized OAuth - Invalid Access Tokens Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/unauthorized_oauth_oauth_test_invalid_access_tokens_will_lead_to_error_messages This section details the request and response when an invalid access token is used with the Product Hunt API, resulting in a 401 Unauthorized error. ```APIDOC ## POST /v2/api/graphql ### Description This endpoint is used to make GraphQL queries to the Product Hunt API. When an invalid access token is provided in the headers, the API will return a 401 Unauthorized status code with specific error details. ### Method POST ### Endpoint /v2/api/graphql ### Headers - **Accept**: application/json - **Content-Type**: application/json - **Host**: api.producthunt.com - **Authorization**: Bearer ### Request Body ```json { "query": "query { viewer { user { username } } }" } ``` ### Response #### Success Response (401) - **data** (null) - The data field will be null when an error occurs. - **errors** (array) - An array containing error objects. - **error** (string) - The type of error, e.g., "invalid_oauth_token". - **error_description** (string) - A detailed message explaining the error, including instructions on how to resolve it. #### Response Example ```json { "data": null, "errors": [ { "error": "invalid_oauth_token", "error_description": "Please supply a valid access token. Refer to our api documentation about how to authorize an api request. Please also make sure you require the correct scopes. Eg 'private public' to access information on behalf of a user." } ] } ``` #### Response Headers - **X-Frame-Options**: SAMEORIGIN - **X-XSS-Protection**: 1; mode=block - **X-Content-Type-Options**: nosniff - **Cache-Control**: no-store - **Pragma**: no-cache - **WWW-Authenticate**: Bearer realm="ProductHuntOauth2", error="invalid_token", error_description="The access token is invalid" - **Content-Type**: application/json; charset=utf-8 - **Content-Length**: 267 ``` -------------------------------- ### Product Hunt API Unauthorized Response Body Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/unauthorized_oauth_oauth_test_invalid_access_tokens_will_lead_to_error_messages The response body for an invalid token error, providing details on the error and guidance on obtaining a valid token. ```json { "data": null, "errors": [ { "error": "invalid_oauth_token", "error_description": "Please supply a valid access token. Refer to our api documentation about how to authorize an api request. Please also make sure you require the correct scopes. Eg 'private public' to access information on behalf of a user." } ] } ``` -------------------------------- ### Product Hunt API Unauthorized Response Status Source: https://api.producthunt.com/v2/docs/oauth_user_authentication/unauthorized_oauth_oauth_test_invalid_access_tokens_will_lead_to_error_messages A 401 Unauthorized status code indicates that the provided access token is invalid or missing. ```http 401 Unauthorized ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.