To get your key ID(kid), copy it from App Store Connect by logging in to App Store Connect, then:
Select Users and Access, then select the Keys tab.
To get your private key, download the file, ending with '.p8', associated with your key ID.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags: