Destination Weather API Developer's Guide

Authentication Examples

This section provides examples for all three authentication methods.

App ID and App Code

The following sample demonstrates authentication with app ID and app code that are parameters in a request URL.

https://weather.api.here.com/weather/1.0/report.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&product=observation
&name=Berlin
For more information on app ID and app code, see Authentication Guide.

API Key

The following sample demonstrates authentication with an API Key that is a parameter in a request URL.

https://weather.ls.hereapi.com/weather/1.0/report.json
?apiKey={YOUR_API_KEY}
&product=observation
&name=Berlin
For more information on API Keys, see Authentication Guide.

Authentication Token

The following sample demonstrates how to use an authentication token as a parameter in an HTTP header using cURL.

curl https://weather.ls.hereapi.com/weather/1.0/report.json
?product=observation
&name=Berlin
-H "Authorization: Bearer {YOUR_TOKEN}"
For more information on authentication tokens, see Authentication Guide.