title: Send to individual devices giving an error when function is run locally
body: <p>I have a Firebase Cloud Function that <a href="https://firebase.google.com/docs/cloud-messaging/admin/send-messages#send_to_individual_devices" rel="nofollow noreferrer">sends a message to devices</a>:</p>
  
  <pre><code>admin.messaging().sendToDevice(registrationTokens, payload, options)
      .then(function() {
      })
      .catch(function(error) {
          console.log(error.message);
      });
  </code></pre>
  
  <p>This works without an error when the function is deployed but when it is run locally (<code>firebase serve --only functions</code>) it gives this error:</p>
  
  <blockquote>
    <p>An error occurred when trying to authenticate to the FCM servers. Make
    sure the credential used to authenticate this SDK has the proper
    permissions.</p>
  </blockquote>
  
  <p>Any ideas why this is happening?</p>