Codemagic "Invalid API Key" problem when setting "Apple Developer Portal" integration

Viewed 401

I am trying to link my Codemagic account to Apple with "Apple Developer Portal integration". I followed the official instructions but when I try to upload my p8 key I get this error:

Invalid API Key
Please select a .p8 private key

I double-checked and my file looks fine. When opened in a text editor it looks like this:

-----BEGIN PRIVATE KEY-----
M............Y
-----END PRIVATE KEY-----

In total it has 203 letters/digits (not sure how many should be there).

Is this a problem with my certificate? Or is Codemagic mixing something up?

1 Answers

First, try to make sure that the original name of the .p8 file contains your Key ID. If the Key ID is 4X5V82XXXX, the certificate name would be AuthKey_4X5V82XXXX.p8.

Second, try to re-generate the key along with the certificate, the certificate may have expired (it is valid for 12 month)

Note, you can download the certificate from App Store Connect only once for each Key ID

Related