I'm able to connect using the below communication script, but unable to receive and store the response which is the access_token. Have you had a chance to look at what I sent via your business email?
def connect(channeldict):
print 'connect',channeldict['idchannel']
def main(channeldict,*args,**kargs):
paramsDict = {
'mode': 'https',
'uri': '/Axis/Login',
'header': {
'Content-Type': 'application/x-www-form-urlencoded'
},
}
url = paramsDict.get('mode') + "://" + channeldict['host'] + paramsDict.get('uri') # Adds param dictionary items to make up URL
outResponse =
requests.post(url, headers = paramsDict.get('header'), data = 'grant_type=password&username=GEDI&password=xxx96!1')
if (outResponse.status_code != requests.codes.ok):
raise Exception(_(u'Http send error, response code is %s and content is %s.')%(outResponse.status_code, outResponse.text))
response = (outResponse.content)
if not response['status'] or response['message']:
raise botslib.CommunicationError('Status: %(status)s, Message: %(message)s' %response)
def disconnect(channeldict):
print 'disconnect',channeldict['idchannel']
Thanks,