Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Mismatchsenderid error with firebase token #158

Open
MRashad26 opened this issue Apr 12, 2021 · 6 comments
Open

Getting Mismatchsenderid error with firebase token #158

MRashad26 opened this issue Apr 12, 2021 · 6 comments

Comments

@MRashad26
Copy link

        const settings = {
            gcm: {
                id: globals.push_key,
            },
            apn: {
                token: {
                    key: globals.p8_name
                    keyId: globals.keyId,
                    teamId: globals.teamId,
                },
            },
            production: true
        };
@alex-friedl
Copy link
Collaborator

alex-friedl commented Apr 13, 2021

@MRashad26 Looks like a configuration issue on your end? Do you maybe use a legacy GCM sender ID for a FCM application?

@MRashad26
Copy link
Author

@alex-friedl so you mean i can’t use firebase token with this setting?? And if i can, could you please send the right configuration settings to do so?? Highly appreciate your support.

@alex-friedl
Copy link
Collaborator

alex-friedl commented Apr 13, 2021

@MRashad26 You should be able to use Firebase tokens without any issue. From what I understand looking at the FCM docs, the sender ID you specified is not allowed as a sender by the respective client app? I think you ned to make sure to use the correct sender ID. Please refer to the FCM docs:

Mismatched Sender | 200 + error:MismatchSenderId | 
A registration token is tied to a certain group of senders. 
When a client app registers for FCM, it must specify which senders are allowed to send messages. 
You should use one of those sender IDs when sending messages to the client app. 
If you switch to a different sender, the existing registration tokens won't work.

@MRashad26
Copy link
Author

MRashad26 commented Apr 20, 2021

@alex-friedl if I'm going to use the firebase APN's Authentication Key for IOS then the APN will look like this
apn: { token: { key: '', keyId: '', teamId: '' } }
but what will the apn look like if I will use the APN's Certificates instead.

@alex-friedl
Copy link
Collaborator

@MRashad26 The format is the same for APN keys obtained from Apple or Firebase. In either case you will have a key file, id and team id

@alex-friedl
Copy link
Collaborator

@MRashad26 Do you still experience these issues or have you figured the setup out? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants