0

I need the APN key to configure Firebase Cloud Messaging (FCM) for an App. I asked this key and I've received something like this text by email:

auth:
key_identifier: "J54F12867G"
encryption_key: |

-----BEGIN PRIVATE KEY-----
Mfsd9c8asdc8as9dca9sd8causdncnasldcnadLKNKJNkjnkjnLKJNLNLJNLNjln
jbhjkhbghvjhvfgchcHFCGHFCVyunlNunbuYByut56769706VHGVUYTVtyvytvtr
kjhbkjhbYbybUY7lkajsdnclkjnHkJHBkJHBs89098765lkjnlkjnjkhbjah788s
asda7kKJ
-----END PRIVATE KEY-----

But, I know that FCM requires a .p8 file. How should I do to convert that text into a .p8 file? Maybe a .p8 file is just a text file with that inside? Thanks.

Sebastian Diaz
  • 155
  • 7
  • 19
  • It seems you got one yaml file, maybe you could try to encryption_key directrly – zangw Nov 16 '21 at 07:44
  • what do you mean with "try to encryption_key"? Would you explain me a little more? Thanks. – Sebastian Diaz Nov 16 '21 at 12:38
  • Sorry for misleading you. Given the name of yaml file is `a.yaml`, you can try to get the .p8 file through `a. encryption_key ` after reading the yaml file in your code – zangw Nov 17 '21 at 01:15
  • Ok, the problem is that I need the .p8 file to import in FCM configuration. That is the only way I see int the FCM web configuration to include the APN key there. – Sebastian Diaz Nov 17 '21 at 15:04
  • Just include those `-----BEGIN PRIVATE KEY----- Mfsd9c8asdc8as9dca9sd8causdncnasldcnadLKNKJNkjnkjnLKJNLNLJNLNjln jbhjkhbghvjhvfgchcHFCGHFCVyunlNunbuYByut56769706VHGVUYTVtyvytvtr kjhbkjhbYbybUY7lkajsdnclkjnHkJHBkJHBs89098765lkjnlkjnjkhbjah788s asda7kKJ -----END PRIVATE KEY-----` into one p8 file – zangw Nov 17 '21 at 15:42

0 Answers0