Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wordpress.com API Access token
import requests
data = {
'client_id': 1234,
'redirect_uri': 'http://gc-taylor.com',
'client_secret': 'yoursecrethere',
'code': 'yourcode',
'grant_type': 'authorization_code',
}
r = requests.post('https://public-api.wordpress.com/oauth2/token', data=data)
print r.content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.