Development issue/problem:

I am trying to switch to the GCM and I have a problem with the SENDER_ID that I need to specify. I’m using a demo project from Google. In this project, as I understand it, I have to give the application a SENDER_ID in the CommonUtilities.java file.

The SENDER_ID that I have provided is the API key that I registered on https://code.google.com/apis/console/ and that has this form : AIzaSyAxxxxxxx_xxxxxnoGZw (40 diagrams in total).

With this channel as SENDER_ID I get an error message on the BroadcastReceiver mHandleMessageReceiver : From GCM : Error (INVALID_SENDER) .

What’s the problem? The string I specified is not a SENDER_ID?

Thank you so much!

How can I solve this problem?

Solution 1:

No, SENDER_ID is the identifier of the project you saved in the Google API console, it must contain a numeric string. For example, you should see the following in your browser’s URI:

https://code.google.com/apis/console/#project:4815162342

Sender ID 4815162342

Response updated :

Google has not fully updated its documents. The above answer is old and based on this documentation, and it seems that it has still not been updated.

According to Google’s updated documents, the project number is used as the sender ID in the Google API console.

Solution 2:

I did that for the Google API of the Last Console.

Where did you get the transmitter?

Steps:

  1. Open the Google api console
  2. Create a project
  3. Click on the icon in the left menu
  4. Click on the Google Cloud platform
  5. There you will receive the SenderId

Reference :

I hope this helps.

Solution 3:

Go to the Google API console page. Select the project you want to use from the drop-down menu on the left. Select Browse and you can now see your project number. This is the sender’s identification number to use.

Another way to get your project number is by requesting the value of the project from your url. Your urn should look like this: https://code.google.com/apis/console/b/0/#project:886025556782 Here is the project number 886025556782. This is the SENDER_ID number.

Solution 4:

Response updated in November 2014. WHEN YOU’VE OPENED THE API OF THE DESIGN REVIEW.

First of all, it is absolutely necessary to go to the Google Developer Console and find the project for which you have activated GCM. In the overview (left navigation bar) you will see the project ID and project number on the right. I didn’t get the project ID (which led me here), but when I tried out the project number, I was able to register my customers correctly.

Note that this is different because Google has recently changed the way it allocates project IDs. I did a project in October and I got all the digital identifiers for the project, which I assume will work well. But the one I made today has a double word and an identification number (like hamster party-420) and a digital project number. My project URL contains Hamster Party-420, and the project number is only visible in the preview screen.

Solution No 5:

Another updated answer with a small explanation of the confusion (…kind of) (taking into account @azgolfer, @PankajAndroid and @Adam).

1- When you create a project at https://console.developers.google.com, you can see two things in the project preview: PROJECT ID and NUMBER. The project ID is no longer numeric, but alphanumeric, such as master-xxxx-1234. The project number is an 11-digit number such as 123456789100.

Android GCM SENDER_ID, how to get it? –

2- If you look at the link in your browser, you can also find it as follows:
https://console.developers.google.com/project/master-xxxxx-1234.

So is master-xxxx-1234 a SENDER_ID (also called PROJECT ID in some places)? NO.

You must use the project number as the project identification in the GCM.

3- Where can you check if the project ID is used as project ID?

Via the Dashbaord API (url: https://code.google.com/apis/console/b/0/?noredirect#project:12345678900 – where 12345678900 is your project number on the project dashboard.

Android GCM SENDER_ID, how to get it? –

SUMMARY : The Project ID in the Project Panel and the Panel API are different. The project number in the Project Dashboard is used as the Project ID in the IPY Dashboard, and the Project ID in the Project Dashboard is used as the project name in the IPY Dashboard. Therefore, the project number displayed in the Project Dashboard when you create a project in the Developer Console is used as the SENDER_ID in GCM.

Solution No 6:

In the latest version of the Developer Console, go to the Dashboard and click on the drop-down arrow under the Project heading: Turtle Power, and you can see the project number here! Use as sender ID

(fake project, so don’t even try =P)

Android GCM SENDER_ID, how to get it? –

Solution No 7:

You may not have Google Cloud Messaging for Android enabled in the COnsole API.
Here are the instructions:

http://developer.android.com/google/gcm/gs.html

Solution No 8:

We spent hours trying to figure it out. The problem was that our android manifesto contained no sender ID!

Solution No 9:

If you’re here because you’re pressing a web button, an android or whatever, the answer is different.

Source: https://firebase.google.com/docs/cloud-messaging/js/client

Android GCM SENDER_ID, how to get it? –

Solution No 10:

The SENDER_ID you are using is nothing more than an authorization key.
You can find the SENDER_ID on your project URLs in the Google APIs console pages.

https://code.google.com/apis/console/#project:8543162367

here 8543162367 is your SENDER_ID ,
and also the project ID is no longer numeric but only alphanumeric or alphanumeric but the position is the same as I indicated.

Good luck!

gcm_sender_id onesignal,how to get auth key in firebase,how can i find firebase api key,fcm authorization key,mismatch sender id fcm,gcm in android,get firebase project id,google cloud messaging,google api console,firebase console,fcm sender id,fcm sender id mismatch,how to find authdomain in firebase,firebase appid,firebase api key authentication,firebase legacy server key not showing,firebase server key vs legacy server key,fcm server key,expo fcm documentation,cloud messaging key,appid in firebase,mparticle android sdk,firebase cloud messaging android,messagingsenderid firebase,measurementid firebase,firebase get appid,how to get fcm id in android,gcm_sender_id,firebase gcm sender id,google api,firebase cloud messaging android tutorial,https android googleapis com gcm send

You May Also Like

Steps To Start And Join Live Voice Chat On Telegram

To attract more users to its cloud-based instant messaging solution, Telegram announced…

Something went wrong while downloading your template [Fix]

How to correct an error when loading a model? 1. Retrieve a…

Why Choosing an ITAD Company is Important to your Business

The destruction of hard drives as a means of data protection is…

Download Vivo PC Suite and Vivo Mobile Assistant Latest (2021)

Vivo PC Suite (Vivo Assistance Manager) is a tool for the Windows…