title: node-gcm server receive error: MismatchSenderId
body: <p><strong>I have some problems with my project, i hope you will help me!</strong></p>
  
  <p><strong>Description:</strong> </p>
  
  <p>I use library from <a href="https://github.com/ToothlessGear/node-gcm" rel="nofollow noreferrer">https://github.com/ToothlessGear/node-gcm</a> to build server push notification for some devices.</p>
  
  <p>I have configured API key from Google Cloud Message to SenderId.</p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>var message2 = new gcm.Message();
  
  **// ... or some given values
  var message2 = new gcm.Message({
      collapseKey: 'demo',
      delayWhileIdle: true,
      timeToLive: 3,
      data: {
          key1: 'message1',
          key2: 'message2'
      }
  });
  
  // Change the message data
  // ... as key-value
  message2.addData('key1','message1');
  message2.addData('key2','message2');
  
  // ... or as a data object (overwrites previous data object)
  message2.addData({
      key1: 'message1',
      key2: 'message2'
  });
  
  // Change the message variables
  message2.collapseKey = 'demo';
  message2.delayWhileIdle = true;
  message2.timeToLive = 3;
  message2.dryRun = true;
  
  // Set up the sender with you API key
  var sender = new gcm.Sender('AIzaSyBzb1PsEBEiAjagslkEANqyxxxxxxxxx');
  
  // Add the registration IDs of the devices you want to send to
  var registrationIds = [];
  registrationIds.push('APA91bHAbFJYpHsSN-uz1Hkh8XjBw4xU87VIz5hZYOtobVv6I2pUZM67pWUGbb5zcP2HxXrooYiIOhzhIV7TuRDbVOlRDak-.xxxxxxxxxx');
  
  sender.send(message2, registrationIds, 4, function(err, result) {
      console.log(result);
  });**
  </code></pre>
  
  <p>Then, I ran and recevied message as picture!</p>
  
  <p><img src="https://i.stack.imgur.com/9ruZ4.png" alt="enter image description here"></p>