IBM Support

Maximo Anywhere 7.6.1 Push Notifications - Obtaining the GCM SenderID and API Key

Technical Blog Post


Abstract

Maximo Anywhere 7.6.1 Push Notifications - Obtaining the GCM SenderID and API Key

Body

I was working through writing up some documentation on the detailed configuration of Push notifications for Maximo Anywhere 7.6.1 and I ran it to an issue where the previous senderID and API key I had generated for our release of Push Notifications for the Maximo Anywhere 7.6 ISM was no longer working.  My notifications were going outbound to MobileFirst without issue, however when attempting to connect to Google Cloud Messaging I was receiving the following error in the MobileFirst logs.

 

[project MaximoAnywhere]
 00000253 com.ibm.pushworks.server.notification.gcm.GCMSender          E FPWSE1055E: Failed to invoke Google GCM push service.
com.ibm.pushworks.server.exceptions.GCMException: GCM Service invocation failed (reason: Authentication has failed for sender key starting with 'AIzaSyC_')
    at com.ibm.pushworks.server.notification.gcm.GCMSender.sendNoRetry(GCMSender.java:261)
    at com.ibm.pushworks.server.notification.gcm.GCMSender.sendAndVerify(GCMSender.java:147)
    at com.ibm.pushworks.server.notification.gcm.GCMMediator.sendOrWait(GCMMediator.java:146)
    at com.ibm.pushworks.server.notification.gcm.GCMMediator.sendNotification(GCMMediator.java:135)
    at com.ibm.pushworks.server.notification.Mediator$2.run(Mediator.java:96)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

 

Looking in to this a bit further I found out that the issue is occurring due to a change that recently happened where server keys can no longer be generated from  https://console.developers.google.com/ as of September 2016.  Currently our documentation points to the above address to generate your key and once there you can create a project and API key still, however it is not a server type API key that MobileFirst requires.   To generate the proper key you will want to create your Anywhere Push Notification project on https://console.firebase.google.com/

 

Please see the below steps to generate your SenderID and API key for use with Maximo Anywhere for Android Devices.

 

1. Log in to https://console.firebase.google.com/

2. Click on 'Create New Project'

3. Give your project a unique name and enter your country  similar to what you see below and click 'Create Project'

 

image

 

4.  Once you project is created in the top left hand corner click on the gear then choose Project Settings.

 

image

 

5. Click on the cloud messaging tab and you will now see the Server API Key and the Sender ID that you will reference in your Maximo Anywhere build.properties

 

 

image

 

The Server Key and Sender ID here will be used by MobileFirst to connect to Google Cloud Messaging and send the notifications to your device.  Over the next couple days I will post step by steps for configuring the notification queues for Maximo Anywhere as well as configuring the Application its self and testing notifications.  I will link the documents together once available for easy reference.  If you have any questions comments or concerns please post below.

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11130661