xTour - planBasicTour HTTP Error 403

Proper forum for all questions related to xServer INTERNET = the Azure based cloud solution. This forum deals with the architecture topics such as load balancing, available profiles and standard server settings.
Please be aware that questions about core functionality such as routing, mapping, geocoding in general should be placed in the xServers dedicated forum ;-)

xTour - planBasicTour HTTP Error 403

Postby couplink-dev » Wed Jun 13, 2018 3:22 pm


when sending a planBasicTours-Request to https://api-test.cloud.ptvgroup.com/xtour/ws/XTour the following exception is thrown:

"HTTP-Status 403: Forbidden - User could not be authorized. You can't run job-methods on api.cloud.ptvgroup.com. User tried to access features which are forbidden for this url and has an empty / unauthorized feature set.."

This can be recreated using the Raw Request Runner.

However, if I send my Request to https://xtour-eu-n-test.cloud.ptvgroup.com/xtour/ws/XTour I get my expected result.

Why do these two endpoints behave different?

Best Regards,

Posts: 1
Joined: Wed Jun 13, 2018 2:58 pm

Re: xTour - planBasicTour HTTP Error 403

Postby Bernd Welter » Wed Jun 13, 2018 3:56 pm

Hello Tim,

the error message you faced is related to the different versions of so-called datacenter URL scheme. As you might know the server software is installed in Microsoft's AZURE cloud and some of the systems are clustered via several data centers.

Behind some xServers we use a job database (e.g. to enable users to monitor active optimization calls in case of asynchronous calls). In fact there's an individual job database behind each data center which means you need to ensure to send a succeeding call to the same datacenter as the "initial call". This is why we offer the qualification in the service URL. We call this the routed URL scheme:

  • If you use the "unqualified" service URL such as http://api.cloud.ptvgroup.com the AZURE load balancer determines the best datacenter (geographically close, not utilized,...).
  • If you use the "qualified" service URL such as http://api-eu.cloud.ptvgroup.com the load balancer redirects you to the corresponding data center.

Long story short: if you want to work with asynchronous calls (or with methods which use the job database) you have to use the qualified URL scheme.
This applies at least to
  • Tour.startPlanBasicTours / startPlanSequence / startPlanOvernightTours
  • xRoute.startCalculateMatrixInfo / startCalculateBulkRouteInfo
  • xLocate.startFindAddresses / startFindLocations / startFindPOIByAddresses / startFindPOIByLocations

Further info is available at http://xserver.ptvgroup.com/en-uk/cookb ... formation/

Best regards,
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1098
Joined: Mon Apr 14, 2014 10:28 am

Return to PTV xServer INTERNET (Admin=OH,SM)