Hello Apple Developer Forums,
We are unable to authorize the Production App Store Server API Request a Test Notification endpoint.
Environment: Production API: Request a Test Notification Library: Apple App Store Server Library for Java 5.2.0 Client: AppStoreServerAPIClient Result: HTTP 401 Unauthorized before a testNotificationToken is returned.
We have verified the following:
- The key is an active In-App Purchase key created in App Store Connect under Users and Access > Integrations > In-App Purchase.
- The production server uses the matching .p8 private key, Key ID, Issuer ID, and bundle ID.
- The bundle ID is com.ansio.serviceproof.ios.
- The server clock is NTP-synchronized.
- The request uses the official Apple Java Server Library rather than a manually generated JWT.
- We rotated the production In-App Purchase key once and received the same 401 result.
- The notification URL is configured for the Production environment, uses HTTPS, and is reachable.
- Sandbox uses an independent key and notification configuration.
We intentionally do not include the private key, JWT, Key ID, or Issuer ID publicly.
According to the documentation, HTTP 401 means the JWT is invalid. Since the official library creates the JWT and the active In-App Purchase key configuration has been verified, could Apple clarify:
- Is any additional App Store Connect role, agreement, team activation, or entitlement required for a Production In-App Purchase key to authorize App Store Server API requests?
- Is there a known propagation or authorization issue that can cause a newly created active In-App Purchase key to return 401?
- What non-sensitive diagnostic details can help distinguish a JWT construction issue from a team-level authorization issue?
Thank you.