We are trying to sign JWT for calling notification history api (https://api.storekit.itunes.apple.com/inApps/v1/notifications/history). We have followed the steps mentioned in "generating tokens" page (https://developer.apple.com/documentation/appstoreserverapi/generating_tokens_for_api_requests). But while trying to sign the jwt from JWT.io website, we are facing some issues. We kept algorithm as ES256, gave header and payload. And also copy pasted the private key we downloaded, from users and access, keys section. But we don't know what is the public key. We tried few things. But always getting "invalid signature" error. Please give us an idea how to enter the private key and what public key we have to give.
How to sign jwt token for calling app store connect api?
Can you post the details (redacted from private info) of your JWT. You should not have to supply the public key. It is already stored within Apple's server and referenced via the "kid" in the header.
You can try manually generating a signed token with proper parameters and keys here and see if the signature validates.
https://token.dev/