Howto send notification from raspberry pi using curl
<p>I have an Android app that is receiving notifications via Firebase Cloud Messaging.</p>

<p>Sending notifications from the Firebase Console works fine but I want to send them from a Raspberry Pi using curl like this (found somewhere on stackoverflow):</p>

<pre><code>curl -X POST --header "Authorization:key=&lt;api key&gt;" --header "Content-Type:application/json" https://fcm.googleapis.com/fcm/send -d "{\"to\" : \"&lt;registration id&gt;\", \"notification\" : {\"body\" : \"Yellow\"} \"priority\" : \"high\"}"
</code></pre>

<p>That allways givs me:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;Internal Server Error&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000"&gt;
&lt;H1&gt;Internal Server Error&lt;/H1&gt;
&lt;H2&gt;Error 500&lt;/H2&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;</code></pre>
</div>
</div>
</p>

<p>Does anyone know what the problem might be?</p>

<p>Added:
my registration id looks like this (almost):</p>

<blockquote>
  <p>dxxxxxxxVEs:APA9xxxcL--JnhswC1w8utjxxxxxxxxxxxxxxxxxxxglosvLbvEAwh7sxxxxxxxxxQo3Fq4sn0yqZUN6Hy89IB9mAS3FusBo68UE4l3xDVRHxxxxxxxxxxpANAHWuLgXHqBoDsLsXBj</p>
</blockquote>