Created
September 20, 2018 14:08
-
-
Save MikSDigital/d96c9a6d342669ecb36ab0fef747a431 to your computer and use it in GitHub Desktop.
webinars creation via API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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