NovuN
Novu11mo ago
Narek

Failed to generate token: secretOrPrivateKey must be an asymmetric key when using ES256

I have an iOS mobile application (https://apps.apple.com/us/app/ferienhausmiete/id6475052679) generated by PWABuilder. I setup Novu for sending push notifications via APNs provider. I am sending POST request to https://eu.api.novu.co/v1/events/trigger with PostMan and getting this response
{
"data": {
"acknowledged": true,
"status": "processed",
"transactionId": "29861fe0-f8c5-4126-9f03-fc56e97e9eb4"
}
}
but in Activity Feed page I have an Error (check the screenshot).

I have double checked Key ID, Team ID, Bundle ID. With Private Key I made more checks. Private Key format is correct, I copy/paste it from AuthKey_XXX.p8 file (including -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- parts), I verified it with openssl ec -in AuthKey_XXX.p8 -text -noout command and the result was like this

read EC key
Private-Key: (256 bit)
priv:
XX:XX:XX...
pub:
XX:XX:XX...
ASN1 OID: prime256v1
NIST CURVE: P-256

which means that everything is correct. On application side everything looks correct, after instalation I am asking for a permision to send notifications.
Please help me to figure out with this problem. Let me know if you need more information/data to help me.
Thanks in advance.
image.png
Was this page helpful?