skip to Main Content

Trying to implement Firebase Cloud Messaging API (V1) as Cloud Messaging API (Legacy) is getting depreciated from 20/06/2024, I’m trying to generate API key for the new API v1, but there seems to be no way around it. The attached screenshot is my firebase console. It said there is no option to generate an API key.

enter image description here

if not FCM, is there any other platform which can help me deploy push notifications.

2

Answers


  1. The versioned API of Firebase Cloud Messaging no longer allows using just an API key for authorization. From the documentation on upgrading to the v1 API, specifically the section on updating the authorization of send requests:

    In place of the server key string used in legacy requests, HTTP v1 send requests require an OAuth 2.0 access token.

    So you’ll have to instead create an OAuth token and pass that with the call.

    Also see the documentation on authorizing send requests in the v1 API.

    Login or Signup to reply.
  2. There is no API key in v1. You can generate a .json with the credentials of a service account, a OAuth token (with refresh token too) or use Google’s ADC.

    I implemented with the JSON file and no problems with that.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search