FCM getting MismatchSenderId

前端 未结 29 1889
刺人心
刺人心 2020-12-04 17:34

I have an application that uses Google FCM for sending push notifications.

When i send a push notification to a group of users, i get a response of MismatchSen

相关标签:
29条回答
  • 2020-12-04 17:42

    For eliminate this error for mismatch sender Id In fcm

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

    there is error occured,

    1. So we required first, In FCM, register Application e.g MyDemoApplication

    2. After that FCM will generate server key i.e AIzaSyB9krC8mLHzO_TtECb5qg7NDZPxeG03jHU and sender Id i.e 346252831806 these format like these.

    3. After In Android Studio, our project is connect to these FCM created project i.e MyDemoApplication

    4. And most important step is there required to device token or registration id. These token must created in Android Studio..

    5. After that using Sender Id and API key in web API project u will be definitely getting notification

    0 讨论(0)
  • 2020-12-04 17:42

    I had the same problem, and I fixed it like this:

    1. Go to your google fcm console
    2. Select your app
    3. In the left side menu find settings icon (standard wheel)
    4. Click on it and after click on project settings
    5. Now copy your server key and paste it in php

    Voila...

    0 讨论(0)
  • 2020-12-04 17:43

    In my case, I just was mistaking about project credentials: using google-services.json from one project, and server key from another.

    0 讨论(0)
  • 2020-12-04 17:43

    You will have a server key something like this AIzaSyDiTEVq4Li1pj7IyraRlyRU9adc-49-KVY available in the Settings section of firebase console console.firebase.google.com/project/project-XXXXXXXXXXXXX/settings/cloudmessaging.

    Specify the correct key with your code and try again.

    0 讨论(0)
  • 2020-12-04 17:44

    Make sure you remove all the Parse code from your app (libraries, receivers in AndroidManifest, etc). I found that intermittently push notifications were not working. From my observations, it would work on fresh installs but not app updates from the play store.

    I believe something internal to Parse was conflicting with FCM (Parse uses GCM, so I'm guessing it had to do with using GCM and FCM simultaneously). As soon as I ripped out all the Parse receivers and libraries, things worked great.

    0 讨论(0)
  • 2020-12-04 17:47

    Actually there are many reasons for this issue. Mine was because of Invalid token passed. I was passing same token generated from one app and using same token in another app. Once token updated , it work for me.

    0 讨论(0)
提交回复
热议问题