Mahi
Mahi

Reputation: 1784

GCM different sender id with mismatchsender id error

I used two different sender ids with two different applications. When I send message first app to second app it is successful, but when I send second app to first I get :

{"multicast_id":8546528660791862014,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"MismatchSenderId"}]}

Upvotes: 2

Views: 1578

Answers (2)

Mahi
Mahi

Reputation: 1784

I have used same sender id for both two application they have also different package name. Not required to create different sender id for different application.Also used same api key for server side

Upvotes: 2

Eran
Eran

Reputation: 394126

The API key you are using to send the messages is tied to a Google API project ID. That project ID is used to register your app to GCM. The registration ID you get when registering your app is tied to that project ID.

Now, if you send a GCM message using API key of project ID A with a Registration ID tied to project ID B, you'll get MismatchSenderId.

You didn't specify if you used the same API key to send messages to both apps and you didn't specify if you used the same project ID to register the two apps to GCM, so it's hard to explain the specific behavior you observed, but my general explanation should point you in the right direction.

Upvotes: 2

Related Questions