Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Push Notifications API Key

Discussion in 'Player Engagement' started by gkara, Jul 7, 2022.

  1. gkara

    gkara

    Joined:
    Sep 7, 2013
    Posts:
    10
    Hello,

    I'm trying to setup the Push Notifications service in a Unity Android project.
    I have to fill in some values in the Project Settings => Services => Push Notifications.
    I have found the Sender ID, Application ID and Project ID in the Firebase console, but I can't find the API Key.
    If I try to run it without the API Key, I get an exception:
    "Exception: UGS Push Notifications is missing Android settings - make sure these are set in the editor Project Settings".

    Anyone knows where I can get the API Key?

    Thanks in advance,
    George
     
  2. mforrest44

    mforrest44

    Unity Technologies

    Joined:
    Apr 9, 2021
    Posts:
    12
    Hey George!

    It should be listed in your Firebase Dashboard as "Web API Key", just below the Project ID (image attached).

    I can see our documentation isn't clear here, so will work with the team to get that updated!

    Let us know if you come across any other issues :)

    Mike
     

    Attached Files:

  3. gkara

    gkara

    Joined:
    Sep 7, 2013
    Posts:
    10
    Hello Mike,

    Thanks for taking the time to answer.
    For some reason, my WEB API Key has this greyed-out value: No Web API Key for this project.
    I have followed the instructions from here:
    https://docs.unity.com/push-notifications/Integration.html
    and there is no mention of creating a Web API Key.

    Cheers,
    George
     
  4. mforrest44

    mforrest44

    Unity Technologies

    Joined:
    Apr 9, 2021
    Posts:
    12
    Hey George,

    No problem, always happy to help.

    This appears to be a Firebase issue - could you toggle Authentication on in your Firebase project and see if that helps?

    More info in this Stack Overflow thread.

    Cheers,

    Mike
     
  5. gkara

    gkara

    Joined:
    Sep 7, 2013
    Posts:
    10
    It worked perfect.
    Thank you very much, Mike.
     
  6. mforrest44

    mforrest44

    Unity Technologies

    Joined:
    Apr 9, 2021
    Posts:
    12
    Great - glad to hear it :)

    Happy Push Notification-ing!

    Mike