Dhanendran
Dhanendran

Reputation: 392

Titanium + GCM : INVALID_SENDER error

I'm new to Titanium app development. Now I'm trying to develop push notification app with GCM. I have done,

  1. Registered in Google Cloud Console and created one project.
  2. Created new server key.
  3. Added those keys in ACS console.
  4. Created test user in ACS console.

But still I'm getting the following error.

Faild to register for push!
INVALID_SENDER

My Titanium code:

CloudPush.retrieveDeviceToken({
    success : function deviceTokenSuccess(e) {
        alert('Device Token: ' + e.deviceToken);
        deviceToken = e.deviceToken;
        loginDefault();
    },
    error : function deviceTokenError(e) {
        alert('Failed to register for push! ' + e.error);
    }
});

Can any one help me in this?

Thanks.

Upvotes: 0

Views: 663

Answers (1)

Eran
Eran

Reputation: 394126

After you create a new project, you'll see at the top of the page something like this :

Project ID: elite-academy-627 Project Number: 152453929631

You need to register to GCM using the project number.

Upvotes: 1

Related Questions