Python
Python 3
Example using requests_oauthlib package
Base oauth client
import json
from requests_oauthlib import OAuth1Session
client = OAuth1Session('PROVIDEDKEYHERE',
client_secret='PROVIDEDSECRETHERE')
base_url = 'https://yourbrand.cloudfrontend.net/api/v2/'GET request
GET requestExample fetching a list of Sites.
response = client.get(
'{}sites/'.format(base_url),
params={
'deleted': 0,
})
content = response.json()POST request
POST requestCreating a new site using a JSON object containing the payload.
Python 2
Example using oauth2 library
GET request
GET requestPOST request
POST requestA JSON object containing the parameters is encoded as a string and then passed as the request body.
Last updated
Was this helpful?