26
Views
2
Comments
Solved
[Cloud Messaging Plugin (Firebase)] The registration token is not a valid FCM registration token (iOS)
cloud-messaging-plugin-firebase
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

Hi everyone,

I'm implementing push notifications using the Cloud Messaging Plugin and it is working fine on Android, but on iOS, I am encountering an issue where the token returned is not recognized as a valid FCM registration token.


So I register the device and get the token via the GetAPNsToken client action which returns something like this "0a6dc198a5c9658757c8338...0cere7286f79284eef9520e"


Then when I call the SendNotificationToUsers Action to send the push I get this error:


I can't figure out why this is happening. Has anyone encountered the same issue?

I’m not sure if this could be the cause, but I’m using a .p12 APNs certificate instead of a .p8. However, since the registration and retrieval of the APNs token are working, I don’t think that’s the problem.


Thanks

2026-01-28 16-04-15
João Carvalho
Solution

Actually I couldn't get the token for iOS before with GetToken but it was probably because of some wrong configuration and I must have gotten confused with something in the documentation about using the GetAPNsToken.

I tried now with the GetToken and it actually returns a token.
However when trying to send the push notification I got this error:

"Auth error from APNS or Web Push Service"

After that, I changed from a p12 (APN Certificate) to a p8 (APN Authentication Key) and it is finally working! 

Thanks Ricardo!

UserImage.jpg
Ricardo Silva

Hey @João Carvalho,

From the looks of it, it appears that you're using the `GetToken` for Android and `GetAPNsToken` for iOS. Can't you use `GetToken` for both? This is the client action that returns the registration token that FCM expects, even on iOS.

BR.

2026-01-28 16-04-15
João Carvalho
Solution

Actually I couldn't get the token for iOS before with GetToken but it was probably because of some wrong configuration and I must have gotten confused with something in the documentation about using the GetAPNsToken.

I tried now with the GetToken and it actually returns a token.
However when trying to send the push notification I got this error:

"Auth error from APNS or Web Push Service"

After that, I changed from a p12 (APN Certificate) to a p8 (APN Authentication Key) and it is finally working! 

Thanks Ricardo!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.