Request an OAuth 2.0 access token that identifies your identity

Request an OAuth 2.0 access token that identifies your identity

Grant Types:

Client Credentials Grant Type [client_credentials]

  • Request a client token that identifies your application by providing your client credentials.
    • Use grant type - client_credentials
    • An optional scope can be added to the request body to request a project scoped access token
    • Client Authentication Methods (one of the following):
      1. OAuth 1.0 Signed Request : The request must be signed with the provisioned client
        access key secret (here.access.key.secret) as documented in Signing Requests

      2. JWT Assertion (private_key_jwt, recommended): Provide client_assertion_type and client_assertion
        parameters in the request body. When using JWT assertion authentication, OAuth 1.0 signature headers
        are NOT required. The client authenticates by presenting a signed JWT containing:

        • iss: client_id of the application
        • sub: client_id of the application
        • aud: token endpoint URL
        • exp: expiration time
        • iat: issued at time
        • jti: unique assertion id (for replay protection)

        The JWT must be signed with a private key whose corresponding public key has been registered
        via the JWKs management API (POST /apps/{app}/jwks).

    • Developers may wish to try out the sample Java code in
      documentation demonstrating this API

Token Exchange Grant Type [urn:ietf:params:oauth:grant-type:token-exchange]

  • Create a new HERE access token via exchange of an existing trusted OpenID Connect Identity Provider
    access token.
    • Use grant type - urn:ietf:params:oauth:grant-type:token-exchange
    • Client authentication via the Authorization header is not required
    • The subject_token identifies the access context in the third-party issuer's identity namespace,
      and the "sub" claim within that token uniquely identifies the security principal within that
      identity provider's namespace
    • If used with a IdentityProvider that is configured for accountType=device, and a "sub" claim is present,
      a DeviceAccount is created upon first token exchange and re-used for subsequent tokens with the same "sub"
      claim value
    • See also OAuth 2.0 Token Exchange

External Issuer Grant Type [jwtIssNotHERE]

  • Sign In with OpenID Connect compliant OEM token
    • Use grant type - jwtIssNotHERE
    • The OEM access token is used in the authorization header
Body Params
string
enum
required

Always "client_credentials" for this operation.

Allowed:
string
enum

The type of client assertion being used for authentication. When present, OAuth 1.0 signature
headers are NOT required. Must be "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" per RFC 7523.
Required when clientAssertion is provided.

Allowed:
string

A single signed JWT used to authenticate the client (RFC 7523 §2.2). When present along with
clientAssertionType, OAuth 1.0 signature headers are NOT required.

The JWT MUST contain the following claims:

  • iss: REQUIRED. The client_id of the application.
  • sub: REQUIRED. Must equal iss (the client_id of the application).
  • aud: REQUIRED. The token endpoint URL (e.g. https://account.api.here.com/oauth2/token).
  • exp: REQUIRED. Expiration time (NumericDate). The AS MAY reject tokens with exp unreasonably far in the future.
  • iat: OPTIONAL. Issued at time (NumericDate).
  • jti: OPTIONAL. Unique assertion id. When provided, it is used for replay protection and MUST only be used once.

The JWT header MUST contain:

  • alg: REQUIRED. The signing algorithm (e.g. RS256, ES256).
  • kid: OPTIONAL. Key ID matching a registered public key. When provided, it is used to identify which registered JWK to verify against.

The JWT MUST be signed with a private key whose corresponding public key is registered for the
application via the JWKs management API. The JWT header MUST include the kid matching the registered key.

integer

Number of seconds before token expires, must number zero or more. Ignored if greater than default expiration of the application.

string
enum

Supported token formats are hN, jwt, jwt+header and jws.

  • 'hN' produces a HERE proprietary-formatted access token.
  • 'jwt' produces a Nested JWT-formatted access token with a JWE enclosed in a JWS.
  • 'jwt+header' produces a Nested JWT-formatted access token with a JWE enclosed in a JWS with additional claims copied into the JOSE header.
  • 'jws' produces a JWS-formatted access token with a JWS Payload containing the plaintext JWT Claims Set.
Allowed:
string

Requested scope of the access token. Must be an HRN identifying a project that the identified client has access to.

string

Anonymous Device id. Supported only if client has deviceTokenCreationEnabled flag enabled. On success, token will contain 'did' claim.

resource
array of strings

Parameter to indicate the resource server for which the access token is requested.

The resource parameter value must be

  1. Must be canonical service URI
  2. Must contain the scheme
  3. Must contain host
  4. May contain path component
  5. May contain trialing slash
  6. Letters may be of uppercase and lowercase form
  7. Should NOT contain query parameters
  8. Must NOT contain fragments
resource
Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*