question

Caleb Vetter avatar image
Caleb Vetter asked

Error when adding Android Push Notifications "Google server API key"

I'm trying to set up Android push notifications in a Unity game. I've followed many tutorials, but I'm stuck.

If I go here: https://console.cloud.google.com/apis/credentials

I can see under API Keys an item called "Android key (auto created by Firebase)" and a Key value. I'm pretty sure I'm supposed to copy this and go to PlayFab > My Project > Title Settings > Push Notifications, click Settings under Android, and paste it in the "Google server API key" field.

Unfortunately I get the error "Invalid parameter: Attributes Reason: Platform credentials are invalid"

I ran across this post: Setup Push Notification on Playfab server for Android - Playfab Community

but the link is dead and the only thing Google brings up with those keywords is that post.

What am I doing wrong?

unity3dPush Notificationsandroid
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

Please follow Push notifications for Android to set the Android Push Notifications. And according to the Setting page of Android Push Notifications, you should input a Server API Key. You could find it in Firebase -> Project settings -> Cloud Messaging -> Server key.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Caleb Vetter avatar image Caleb Vetter commented ·

Oh man. I have been working at this for so long. Your directions to the Server Key in the Firebase Console is exactly what I needed.

FYI, I have been trying to follow the instructions in the link you provided, but now I see they are incorrect. In the instructions, it says Firebase -> Project settings -> General -> Web API Key. That is not the key I needed. For future seekers, use what Gosen said above.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.