Using a Token - web_services - Latest

Spectrum OnDemand Web Services (REST)

Product type
Software
Portfolio
Verify
Product family
Spectrum
Product
Spectrum > Quality > Context Graph
Spectrum > Spatial > Spectrum Spatial Analyst
Spectrum > Spectrum Platform
Spectrum > Quality > Addressing
Spectrum > Quality > Spectrum Quality
Spectrum > Web Services
Spectrum > Dataflow Designer
Spectrum > Discovery
Spectrum OnDemand
Spectrum > Spatial > Spectrum Spatial Insights
Spectrum > Spatial > Spectrum Spatial
Spectrum > Geocoding > Enterprise Tax
Version
Latest
Language
English
Product name
Spectrum OnDemand
Title
Spectrum OnDemand Web Services (REST)
Copyright
2024
First publish date
2006
ft:lastEdition
2024-07-17
ft:lastPublication
2024-07-17T23:23:16.481321

Once you have obtained a token you can use it to authenticate to a to a Spectrum OnDemand web service by including the token in the request. There are two ways of doing this: as an Authorization HTTP header or as a Cookie HTTP header.

Note: There is no limit to the number of web service requests you can make with a token, but if you requested a token with an expiration, the token will eventually expire. If the token is a session token, it will become invalid after 30 minutes of inactivity.

Using the Token in an Authorization Header

To use the token in the HTTP Authorization header, use the format:

Authorization: Bearer Token

For example,

HTTP/1.1

POST http://MySpectrumServer:8080/soap/ValidateAddress
Host: MySpectrumServer:8080
Authorization: Bearer eyJlbmMiBMQI4Q0JDLUhTMjU2I5wiYWxnIjoiZGlyIn0..fc6rpRJ-wo

If the token is a session token, you must also provide the session identifier in the Cookie header in the form:

Cookie: SESSION=SessionID

For example,

HTTP/1.1

POST http://MySpectrumServer:8080/soap/ValidateAddress
Host: MySpectrumServer:8080
Authorization: Bearer eyJlbmMiBMQI4Q0JDLUhTMjU2I5wiYWxnIjoiZGlyIn0..fc6rpRJ-wo
Cookie: SESSION=fff96e54-1615-4192-96c1-ea2f133ec6eb
Note: The cookie name SESSION must be in all caps.
Use the token in the authorization header in this format:
Authorization: Bearer Token

For example,

POST https://api.precisely.com/identify/identifyaddress/v1/rest/validatemailingaddress

Authorization: Bearer eyJlbmMiBMQI4Q0JDLUhTMjU2I5wiYWxnIjoiZGlyIn0..fc6rpRJ-wo

Using the Token in a Cookie Header

If it is easier to use a cookie rather than the Authorization header you can provide the token in the Cookie header in the form:

Cookie: spectrum.authentication.token=Token

For example,

HTTP/1.1

POST http://MySpectrumServer:8080/soap/ValidateAddress
Host: MySpectrumServer:8080
Cookie: spectrum.authentication.token=eyJlbmMiBMQI4Q0JDLUhTMjU2I5wiYWxnIjoiZGlyIn0..fc6rpRJ-wo

If the token is a session token, you must also provide the session identifier in the Cookie header in the form:

Cookie: SESSION=SessionID
Note: The cookie name SESSION must be in all caps.

For example,

HTTP/1.1

POST http://MySpectrumServer:8080/soap/ValidateAddress
Host: MySpectrumServer:8080
Cookie: spectrum.authentication.token=eyJlbmMiBMQI4Q0JDLUhTMjU2I5wiYWxnIjoiZGlyIn0..fc6rpRJ-wo
Cookie: SESSION=fff96e54-1615-4192-96c1-ea2f133ec6eb