Menu
Amazon Pinpoint
Developer Guide

Step 2: Get Push Messaging Credentials for Android

To send push notifications to Android apps, you must have credentials from either Firebase Cloud Messaging (FCM) or its predecessor, Google Cloud Messaging (GCM). The credentials are an API key and a sender ID (also called project number). You get these credentials from a project that has push messaging enabled. This project could either be in the Firebase console or the Google Cloud Platform console, depending on where you created it.

This topic describes how to retrieve your credentials from FCM or GCM. Use FCM for new Android apps. Use GCM only if you have a preexisting GCM project that you have not yet updated for FCM support.

To obtain your credentials from FCM

  1. Go to the Firebase console at https://console.firebase.google.com/ and open your project.

  2. In the left pane, to the right of your project name, choose the gear icon, and then choose Project Settings.

  3. In the top menu, choose Cloud Messaging.

  4. Under Project credentials, you find the API key and sender ID. Save these values somewhere you can access later.

To obtain your credentials from GCM

  1. Go to the Google API Console at https://console.developers.google.com.

  2. In the left pane, choose Credentials.

  3. If you already have credentials for your app, your server key is shown in the API keys section. Save this key somewhere you can access later.

  4. If you don't have credentials for your app, the console displays the Credentials dialog box. Create a server key by completing the following steps:

    1. Choose Create credentials.

    2. Save the API key somewhere you can access later.

  5. To retrieve your sender ID (also called project number), go to the Google Cloud Platform console at https://console.cloud.google.com/. Select your project from the Project menu. Then, choose the arrow next to the project name.

  6. Save the displayed project number somewhere you can access later.

    Note

    Project number is another name for sender ID.