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

SnederId Mismatch #57

Closed
raghunathmestry opened this issue Sep 3, 2020 · 1 comment
Closed

SnederId Mismatch #57

raghunathmestry opened this issue Sep 3, 2020 · 1 comment

Comments

@raghunathmestry
Copy link

hi I got an error in previous days from this module here is the code and screenshot, please I need help to resolve this issue.
error is SenderId mismatch

  1. I create two SHA 1 Keys one for development and the second one is for production.

  2. Also, I change my SHA 1 key from the google developer account for the google play store uploaded file.
    any problems with the above changes in the project?

     $title = 'My Notification Title';
     $body = 'My Notification Body';
    
     $notification = Notification::fromArray([
         'title' => $title,
         'body' => $body,
     ]);
    
     $notification = Notification::create($title, $body);
    
     $messaging = app('firebase.messaging');
     $deviceToken = 'i add my token here.....';
    
     $message = CloudMessage::withTarget('token', $deviceToken)->withNotification($notification); // optional;
    
     $message = CloudMessage::fromArray([
         'token' => $deviceToken
     ]);
     try {
         ...
         $messaging->send($message);
     }  catch (\Kreait\Firebase\Exception\MessagingException $e) {
         dd($e->errors());
     }
    

Untitled

@jeromegamez
Copy link
Member

jeromegamez commented Sep 3, 2020

Duplicate of kreait/firebase-php#468

Please don't cross-post 🙏, one ticket per issue is fully sufficient 😅

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