I am using the default code from the Priority Web SDK package on npm but encounter an error stating "Can't connect to server." when attempting to connect to the Priority service. I'm unsure if the service URL I'm using is correct. I'm in the public cloud and have tried both https://p.priority-connect.online/wcf/service.svc and https://s.priority-connect.online/wcf/service.svc with the same issue. Here is my code:
const priority = require('priority-web-sdk');
var configuration = {
username: 'XXXX',
password: 'XXX',
url: 'https://p.priority-connect.online/wcf/service.svc',
tabulaini: 'tabula.ini',
language: 3,
company: 'demo'
};
priority.login(configuration)
.then(() => priority.formStart('CUSTOMERS', null, null, 'demo', 1))
.then(form => form.getRows(1))
.then(rows => console.log(rows))
.catch(err => {
console.error('Error encountered:', err);
// Log more error details if available
if (err.response) {
console.error('Response:', err.response.data);
} else if (err.request) {
console.error('Request:', err.request);
} else {
console.error('Error Message:', err.message);
}
});
if (typeof window === 'undefined') {
global.window = {}
}
Is https://p.priority-connect.online/wcf/service.svc the correct address for connecting to the Priority service in the public cloud? Any help or insights would be greatly appreciated!