Android push notification Urban AirShip error : invalid authorization on platform GCM

1.5k Views Asked by At

I am using Urban Airship and my pushes are working fine on iOS but I have an error on Android.

In the error console on the urban airship website I have the message :

Received push with invalid authorization on platform GCM

My device is appearing in the section APIDs correctly and I verify all the steps in this address : https://support.urbanairship.com/customer/portal/articles/823114-gcm-troubleshooting-guide.

This code show correctly an APID :

PushManager.shared().getAPID()

My properties seems to be good, I verified :

gcmSender = 123456789122
transport = gcm
developmentAppKey = APP KEY taken on the urban airship site
developmentAppSecret = APP KEY Secret taken on the urban airship site
inProduction = false

I also verified my GCM in the urban airship site, putting the correct Api key and Package from cloud.google.com.

Is there something I forgot?

2

There are 2 best solutions below

4
On

Few things you need to check here

  1. Did u generate the key using Google Projects?
  2. Once app starts, are you receiving unique registration id from Urban airship

Mostly point 2 is issue also check if you are adding quotes to keys, if yes then add keys with no quotes

0
On

I hope the below link will help you.

http://tuohuang.info/urbanairship-android-received-push-with-invalid-authorization-on-platform-gcm/#.U7KMrUCri41

Note: We should select the server key. If we choose any other for push notification,we will fall on this error.