Mitel 3300 REST API
Revision as of 09:10, 25 June 2021 by Michael.mast (talk | contribs) (Created page with "==Example== <ref>http://mitelforums.com/forum/index.php?topic=13874.0</ref> <pre> #!/usr/bin/python3 from requests_oauthlib import OAuth1Session as session ##Consumer inform...")
Example
#!/usr/bin/python3 from requests_oauthlib import OAuth1Session as session ##Consumer information consumer_name = 'sas_usp' shared_secret = '...' token_id = '...' token_secret = '...' ##URLs baseurl = 'https://mca.tld/mslrest' requesturl=baseurl + '/initiate' authurl=baseurl + '/authorize' accesstokenurl=baseurl + '/token' pingurl=baseurl + '/ping' ##initiate oauth = session(consumer_name, client_secret=shared_secret, resource_owner_key=token_id, resource_owner_secret=token_secret) ##Test connection test = oauth.get(pingurl) print(test.text)