Authenticating to Web Services
Spectrum OnDemand web services use HTTP basic authentication. In HTTP basic authentication, the user ID and password are encoded in base64 and passed to Spectrum OnDemand in the HTTP header of each request to the web service.
To authenticate to Spectrum OnDemand web services:
-
Encode your Spectrum OnDemand user name and password in base64 in this
format:
UserName:Password
You can use any base64 encoder to encode your user name and password, including freely available encoders available on the web.
For example, if your user name is MyUsername and your password is Password1, you would encode this string in base64:
MyUsername:Password1
-
Include the base64-encoded user name and password in the Authorization header in the
request, in this format:
Authorization: Basic EncodedUsernameAndPassword
For example,
GET https://spectrum.precisely.com/rest/PsapAhjLookupUS/results.xml?Data.AddressLine1=4200%2BParliament%2BPL&Data.City=Lanham&Data.StateProvince=MD HTTP/1.1 Host: spectrum.precisely.com Authorization: Basic YmFsaTk0OXk6Z3JvqXAh