HTTP-Status 401: Unauthorized - User could not be authorized

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 ;-)
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

HTTP-Status 401: Unauthorized - User could not be authorized

Post by Bernd Welter »

Hi there,

quite often cloud users face the error message "HTTP-Status 401: Unauthorized - User could not be authorized."

There are several potential reasons and countermeasures for this behaviour:
  • You didn't try to authenticate. Congratulations: our cloud services require username and password. Without them you will not gain access.
    Countermeasure: send a token. If you don't have one: register for a trial and you get one ;-)
    Update 9.6.2020: For SOAP and JSON communication you have to use Basic Authentication (username=xtok, password=your token). For the xServer2 REST calls simply add &xtok=yourToken to the Url. See this section, too.
  • You tried to authenticate. So you sent username and password but still don't get access?
    • Maybe the token you use has expired? For example you used the token successful few weeks after registering as test user and now it doesn't work anymore?
      Countermeasure: get in touch with your sales representative to prolong it.
    • The token did work on service alpha but does not work on service beta. E.g. it works for TEST and INTEGRATION but not for PRODUCTION? A valid token grants access to some or even all cloud services. Maybe your token has never been activated for the service you couldn't connect to?
      Countermeasure: get in touch with sales.
Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Oliver Heilig
Posts: 154
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany
Contact:

Re: HTTP-Status 401: Unauthorized - User could not be author

Post by Oliver Heilig »

Hi,

you can check if your token has access to a service here:

https://xserverinternet.azurewebsites.n ... index.html

These rights also apply to API version 2 services.

http://xserver.ptvgroup.com/it/cookbook ... formation/

Oli
Oliver Heilig
Chief Developer Logistic Services
PTV GROUP - Germany

https://github.com/oliverheilig/
Post Reply