cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
690
Views
0
Helpful
3
Replies

extension mobility error proxy with deviceQuery

windleaf5188
Level 1
Level 1

Hello we use cucm 11.5.

When I want to get a deviceName with the request "DeviceQuery", I have a error code "10": DB query error:policy violation:'7131002' is not authorized to authenticate by proxy.

I have added the Standard Extension Mobility (EM) Authentication Proxy Rights for the user 7131002, but I have always the same error.

Here is my codes for DeviceQuery:

 

var request = require("request");

var options = { method: 'POST',
url: 'http://172.22.1.99:8080/emservice/EMServiceServlet',
headers:
{ 'Postman-Token': '2c88b83e-29e8-4e70-bbad-4acb72f17ffe',
'cache-control': 'no-cache',
'Content-Type': 'application/x-www-form-urlencoded' },
form: { xml: '<query><appInfo><appID>7131002</appID><appCertificate>12345</appCertificate></appInfo><userDevicesQuery><userID>7131002</userID></userDevicesQuery></query>' } };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});

 

Some body can help me? Thanks very much !

3 Replies 3

jason-mcgee
Level 3
Level 3

Windleaf5188,

 

You are using third party software "Postman" via a CUCM API to query Extension Mobility information if I understand you correctly. Is this for a 3rd party program that reports on your Extension Mobility users? 

 

Jason

The postman is just for testing.

To query Extension Mobility information, the real codes like this:

 

var request = require("request");

var options = { method: 'POST',
url: 'http://172.22.1.99:8080/emservice/EMServiceServlet',
headers:

'Content-Type': 'application/x-www-form-urlencoded' },


form: { xml: '<query><appInfo><appID>7131002</appID><appCertificate>12345</appCertificate></appInfo><userDevicesQuery><userID>7131002</userID></userDevicesQuery></query>' } };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});

 

I am no expert with this by any means, but it seems to me that the method should be GET or PUT not POST.

 

If you go on the Cisco DevNet API forums, there are some really smart people on those forums for these type of coding specifically and they could probably resolve this almost immediately for you. I am particularly fond of Dekwan. Denise Kwan. She is a Cisco employee and she knows these API's really well.

 

Good luck and sorry I couldn't be of more assistance.

 

Jason 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: