All users of the Traffic Data Service must use the HERE Authentication and Authorization API, which is an OAuth 2.0 compliant REST API that allows you to obtain short-lived access tokens. You must include this access token in every request in the following HTTP request header:
Authorization: Bearer <access-token>
Contact your HERE sales representative to acquire an access key and an access key secret, which you need to generate an access token with the HERE Authentication and Authorization API.
Once you have your access key and access key secret, see the HERE Authentication and Authorization API Developers' Guide for further details on how to generate and use access tokens.
Once you have created an access token with your credentials using the HERE Authentication and Authorization API and included the token in an HTTP request header, you can send your first request to the Traffic Data Service. The example below uses the DATEX II flow content endpoint.
The response to the above request contains an XML structure with DATEX II elements wrapping real-time traffic flow data.
You are not required to add any query parameters to your request. Based on your authentication, the service sends the data for the geographical region and filter that you have licensed.
<?xml version="1.0" encoding="UTF-8"?> <d2LogicalModel xmlns="http://datex2.eu/schema/2/2_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" modelBaseVersion="2" xsi:schemaLocation="http://datex2.eu/schema/2/2_3/DATEXIISchema_2_2_3.xsd"> <exchange> <supplierIdentification> <country>other</country> <nationalIdentifier></nationalIdentifier> </supplierIdentification> </exchange> <payloadPublication xsi:type="ElaboratedDataPublication" lang="en"> <publicationTime>2018-05-02T09:15:23Z</publicationTime> <publicationCreator> <country>other</country> <nationalIdentifier></nationalIdentifier> </publicationCreator> <headerInformation> <confidentiality>noRestriction</confidentiality> <informationStatus>real</informationStatus> </headerInformation> <elaboratedData> ... </elaboratedData> </payloadPublication> </d2LogicalModel>
If you need assistance with this or other HERE products, contact your HERE representative or Technical Customer Support.