Skip to content

Instantly share code, notes, and snippets.

@MikSDigital
Created September 20, 2018 14:08
Show Gist options
  • Select an option

  • Save MikSDigital/d96c9a6d342669ecb36ab0fef747a431 to your computer and use it in GitHub Desktop.

Select an option

Save MikSDigital/d96c9a6d342669ecb36ab0fef747a431 to your computer and use it in GitHub Desktop.
webinars creation via API
import requests
import json
url = "https://api.getgo.com/G2W/rest/v2/organizers/000000000000/webinars"
payload = {
"subject": "test888test",
"description": " - ",
"times": [
{
"startTime": "2018-12-14T16:00:00Z",
"endTime": "2018-12-14T17:00:00Z"
},
{
"startTime": "2018-12-15T16:00:00Z",
"endTime": "2018-12-15T17:00:00Z"
}
],
"timeZone": "UTC",
"type": "sequence",
"isPasswordProtected": 0,
"isOndemand": 0,
"experienceType": "CLASSIC"
}
headers = {
'Authorization' : 'wkfbwkbfkwf3434regf',
'user-agent': 'my-app/0.0.1'
}
r = requests.post(url, data=json.dumps(payload) , headers=headers)
print(r.status_code)
print(r.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment