title: Using Postman with Firebase Cloud Messaging to send a push notification to a specific iOS device
body: <p>I'm trying to send a push notification to a specific iOS device using Postman as a trigger to send a request to Firebase Cloud Messaging. </p>
  
  <p>As a response I get an error saying that I have an invalid APNS credential (InvalidApnsCredential). What am I doing wrong?</p>
  
  <p>The url I'm sending the request to is:</p>
  
  <pre><code>https://fcm.googleapis.com/fcm/send
  </code></pre>
  
  <p>The request headers look like this:</p>
  
  <pre><code>Content-Type: application/json
  Authorization: key=[SERVER_KEY]
  </code></pre>
  
  <p>[SERVER_KEY] is the server key I took from the Firebase console project settings.</p>
  
  <p>The body of the request:</p>
  
  <pre><code>{
      "to": "[REFRESH_TOKEN]",
      "notification": {
          "body": "Test body",
          "title": "Test title",
          "content_available": true,
          "priority": "high"
      }
  }
  </code></pre>
  
  <p>Where [REFRESH_TOKEN] is the refresh token I extract from the FIRInstanceID:</p>
  
  <pre><code>NSString *token = [[FIRInstanceID instanceID] token];
  </code></pre>
  
  <p>The full actual response that is returned:</p>
  
  <pre><code>{
      "multicast_id": XXXXXXXXXXXXXXXXXXX,
      "success": 0,
      "failure": 1,
      "canonical_ids": 0,
      "results": [
          {
              "error": "InvalidApnsCredential"
          }
      ]
  }
  </code></pre>
  
  <p>The multicast_id is some number I just covered up.</p>
  
  <p>I issued fresh production and development certificates and added them to the Firebase console, still the same error. Also, tried with APNs Authentication Key, but to no avail.</p>