firebase / firebase-admin-go

Firebase Admin Go SDK
Apache License 2.0
1.13k stars 244 forks source link

SnederId Mismatch #399

Closed raghunathmestry closed 4 years ago

raghunathmestry commented 4 years ago

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

google-oss-bot commented 4 years ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

raghunathmestry commented 4 years ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

yes but I use all FCM templates from Github. all give me the same error.

hiranya911 commented 4 years ago

You're in the wrong place. This is the repo for the Firebase Go Admin SDK. You seem to be using a third-party PHP module.