title: Firebase Cloud Messaging InvalidRegistration for Topic Messages
body: <p>I am having trouble sending a topic downstream message using Firebase. Everything works fine when I send to single or multiples users using tokens, my code looks like this</p>
  
  <pre><code>notif = {
      'to': 'TOKEN',
      'data': {'msg': 'whatever'},
  }
  opener = urllib2.build_opener()
  data = json.dumps(notif)
  req = urllib2.Request(
      FCM_URL,
      data=data,
      headers={
          'Content-Type': 'application/json',
          'Authorization': 'key=' + API_KEY,
      }
  )
  response = opener.open(req)
  </code></pre>
  
  <p>However if I replace the recipients using a topic, more precisely the code becomes</p>
  
  <pre><code>notif = {
      'to': '/topic/MY_TOPIC',
      'data': {'msg': 'whatever'},
  }
  opener = urllib2.build_opener()
  data = json.dumps(notif)
  req = urllib2.Request(
      FCM_URL,
      data=data,
      headers={
          'Content-Type': 'application/json',
          'Authorization': 'key=' + API_KEY,
      }
  )
  response = opener.open(req)
  </code></pre>
  
  <blockquote>
    <p>{"multicast_id":id,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}</p>
  </blockquote>
  
  <p>Is there something I am missing? I should outline that sending topic messages from the firebase console works fine.</p>
  
  <p>Any help more than welcome,
  Best &amp; thanks!
  Alex</p>