title: FCM Go Adming SDK giving MismatchSenderId
body: <p>I have an application that has two components: A server that uses FCM Go Adming SDK to send push notifications; and a web client that uses FCM web SDK to receive generate registration tokens and receive push notifications.</p>
  
  <p>However, when I try to send a message from the server side; it gives me the following error despite the fact that both SDKs are registered on the same Firebase project:</p>
  
  <pre><code>http error status: 403; reason: sender id does not match regisration token; code: mismatched-credential
  </code></pre>
  
  <p><strong>Server Component Details</strong></p>
  
  <p>I added the Firebase Admin SDK to my Server and initialized it with the service account credentials. The <code>serviceAccountKey.json</code> used for initilization looks like this:</p>
  
  <pre><code>        {
              "type": "service_account",
              "project_id": "myproject",
              "private_key_id": "&lt;PRIVATE_KEY_ID&gt;",
              "private_key": "&lt;PRIVATE_KEY&gt;",
              "client_email": "firebase-adminsdk-yg8ah@myproject.iam.gserviceaccount.com",
              "client_id": "&lt;CLIENT_ID&gt;",
              "auth_uri": "https://accounts.google.com/o/oauth2/auth",
              "token_uri": "https://accounts.google.com/o/oauth2/token",
              "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
              "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-yg8ah%40myproject.iam.gserviceaccount.com"
          }
  </code></pre>
  
  <p>And the server-side code for sending notifications looks like this:</p>
  
  <pre><code>    app, err := firebase.NewApp(context.Background(), nil, option.WithCredentialsFile("./resources/serviceAccountKey.json"))
      if err != nil {
          log.Fatalf("Failed to initialize the notifications server: %v\n", err)
      }
  
      // Obtain a messaging.Client from the App.
      ctx := context.Background()
      client, err := app.Messaging(ctx)
  
      // The message payload.
      message := &amp;messaging.Message{
          Data:         map[string]string{},
          Notification: &amp;messaging.Notification{Title: "Title", Body: "Body"},
          Token:        "&lt;Registration_Token&gt;",
      }
  
      // Send a message to the device corresponding to the provided registration token.
      response, err := client.Send(ctx, message)
      if err != nil {
          log.Fatalf("Failed to send the push notification: %v\n", err)
      }
  </code></pre>
  
  <p><strong>Client Component Details</strong></p>
  
  <p>And for the web client, I created <code>Web Push certificates</code> VAPID key pairs used the <a href="https://github.com/firebase/quickstart-js/tree/e69855293a8035c98275b62f7871c230a45baf13/messaging" rel="nofollow noreferrer">FCM Web SDK sample code for messaging</a> after changing the <code>messaging.usePublicVapidKey('&lt;YOUR_PUBLIC_VAPID_KEY_HERE&gt;');</code> line to <code>messaging.usePublicVapidKey('&lt;MY_PUBLIC_VAPID_KEY_HERE&gt;');</code></p>
  
  <p>Also, the web client app is hosted in Firebase hosting.</p>