Creating a Maps Identifier and private key requires a paid Apple Developer Program membership ($99/year).
Create an authorization token
Sign in to the Apple Developer portal
Go to developer.apple.com and sign in with your Apple ID enrolled in the Apple Developer Program.
Create a Maps Identifier
In the portal, navigate to Certificates, Identifiers & Profiles, then Identifiers. Create a new identifier of type Maps IDs. Give it a descriptive name and ID (for example,
maps.com.yourcompany.backend).Full instructions: Creating a Maps Identifier and a Private KeyCreate a private key
In Keys, create a new key and enable the MapKit JS capability. Select the Maps Identifier you created in the previous step. Download the
.p8 private key file — Apple only lets you download it once.Generate the JWT
Use Apple’s token maker at maps.developer.apple.com/token-maker to generate your long-lived JWT. You’ll need:
- Your Team ID (visible in the top-right of the Developer portal)
- Your Maps Identifier (the
maps.com.yourcompany.backendID from the previous step) - Your Key ID (shown on the key detail page)
- The
.p8private key file you downloaded
The origin claim
When you generate a JWT with a specific origin claim (an HTTP Origin URL bound to the token), every request to the Apple Maps Server API must include that value as the Origin header. If your token has an origin claim, set APPLE_MAPS_ORIGIN to the same value — the SDK reads it and sends it automatically.
If your token has no origin claim, you can omit APPLE_MAPS_ORIGIN entirely.
Initialize the client
Read the token and optional origin from environment variables or JVM system properties, then pass them toAppleMaps: