GuidesAPI Reference
API Reference

Generate API Key

This generates a new API key that you use for authenticating an application. Note that the API key is contained in the field named apiKeyId. The value in the field apiKey is the HERE Resource Name (HRN) prefixed with “hrn" followed by the API key, and is not usable as an API key in the request. A maximum of two API keys can be maintained per application.


Access Control:

  • The calling principal must have "manage" or "write" action permission for the resource "{app}" in the "account" service.
  • The calling principal MUST NOT include a project scope.
Path Params
string
required

HRN identifying the application. Must be URL-encoded, if reserved characters ":/?#[]@!$&'()*+,;=" are used. see https://tools.ietf.org/html/rfc3986#section-2.2.

Body Params
string
required

Creator-defined name or short description for the API key.

int64
Defaults to -1

Timestamp (milliseconds since the Unix epoch) of when the API key will expire. If expiresAt is not provided on creation, it will default to '-1', i.e. API key does NOT expire

boolean
Defaults to true

Whether API key is enabled or disabled.

Headers
string

Correlates HTTP requests between a client and server. If not present in the incoming request, it will be generated. This header and value will be included in all loglines including access logs. It will also be propagated to downstream services and returned in the response.

string

The unique for the request, used to track this request within the service. X-Request-ID value is NOT propagated to the downstream services.

Responses

400
  • 400337 - API Key cannot be generated for client with issuer(s).
401
  • 401300 - Access is denied due to invalid credentials.
404
  • 404660 - No app exists with the given id.
409
  • 409303 - Reached allowed maximum number of active API keys per application. Delete an API key to generate another one.
429
  • 429003 - Request blocked because of too many requests made. Wait for a while before making a new request.
Language
Credentials
Bearer
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json