Mitel 3300 REST API
Jump to navigation
Jump to search
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)