Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Push Notifications API Key

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

  1. gkara

    gkara

    Joined:
    Sep 7, 2013
    Posts:
    12
    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:
    29
    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:
    12
    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:
    29
    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:
    12
    It worked perfect.
    Thank you very much, Mike.
     
  6. mforrest44

    mforrest44

    Unity Technologies

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

    Happy Push Notification-ing!

    Mike