Skip to content

Instantly share code, notes, and snippets.

@sagunsh
Created May 4, 2020 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagunsh/36adc3b2d77390a1895e1e0e0c01e741 to your computer and use it in GitHub Desktop.
Save sagunsh/36adc3b2d77390a1895e1e0e0c01e741 to your computer and use it in GitHub Desktop.
import requests
developer_token = DEVELOPER_TOKEN
url = 'https://api.producthunt.com/v1/posts'
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + developer_token,
'Host': 'api.producthunt.com'
}
response = requests.get(url, headers=headers)
print(response.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment