Today I was trying to use the
django app
django-push-notifications to work with
Google cloud messaging. However, the app required .pem file as input. After some research, I found out how to get the file. Following are the steps.
- Create new client ID from respective project in Google cloud console.
- Choose Service account and save the .p12 file.
- While saving it will show the password, note it down. I guess default password key is 'notasecret'.
- Now download openssl binary from the openssl download page.
- Depending on your operating system the files might vary. I am using openssl on windows x64 box.
- Extract files to a folder.
- Now from command line navigate to the folder and run
openssl pkcs12 -in path/to/key.p12 -nodes -nocerts > path/to/key.pem
- You can find more information about authentication in this page.
No comments :
Post a Comment