Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Can't send push notification to valid GCM token containing ':'



Pega MKT v7.13 doesn't support GCM (Google Cloud messaging) tokens containing the ':' character in valid GCM tokens. User is blocked with the error "Unexpected character in Android push token; please review for accuracy" and Push Notification can't be sent.

This is blocker for the project where Push Notifications are one of 2 main communication channels thus this has to be fixed and provided as a patch.

-doc with Screenshot

Error Messages

Unexpected character in Android push token; please review for accuracy

Steps to Reproduce

Configure mobile application through Configuration -> Settings -> Channels -> Push Notification and add Android variant API Key.
Try to send test Push Notification to the following valid GCM token: <TOKEN KEY OBFUSCATED> using Test option.
Both token and Google API key are customer specific and cannot be detailed here.

Root Cause

A defect in Pegasystems’ code or rules. Google has changed the range of acceptable characters used for GCM tokens.  Pega marketing GCM token validation requires amendment to either include the new character, or not validate the token at all.


Perform the following local-change:

In private edit update of the When condition in PushNotificationForToken activity step 7 to include the ':' in the reqular expression @(Pega-RulesEngine:String).pxContainsViaRegex(Param.PushToken, "[a-zA-Z0-9_\\-:]*", false). 

I believe there is no specification of allowed characters so in the future, Google can generate token that will contain additional characters that are not included in the regular expression so the best solution would be to remove validation at all.  This will be done in the next release of Pega Marketing.

Published March 18, 2016 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us