Admin FCM API는 백엔드 인증을 처리하고 메시지 보내기와 주제 구독 관리를 지원합니다. Firebase Admin SDK를 사용하면 다음 작업을 할 수 있습니다.
개별 기기에 메시지 보내기
주제 및 하나 이상의 일치하는 조건문에 메시지 보내기
기기에서 주제 구독 및 구독 취소
다양한 타겟 플랫폼에 맞는 메시지 페이로드 구성
Admin Node.js SDK는 기기 그룹에 메시지를 보내는 메서드를 제공합니다.
Firebase Admin SDK를 설정하려면 서버에 Firebase Admin SDK 추가를 참조하세요. 이미 Firebase 프로젝트가 있다면 SDK 추가부터 시작합니다. 또한 프로젝트의 클라우드 메시징 설정 페이지에서 Cloud Messaging API를 사용 설정해야 합니다. 그런 다음 Firebase Admin SDK가 설치되면 로직 작성을 시작하여 전송 요청을 작성할 수 있습니다.
[null,null,["최종 업데이트: 2025-08-16(UTC)"],[],[],null,["\u003cbr /\u003e\n\nYour server environment and FCM\n\nThe server side of Firebase Cloud Messaging consists of two components:\n\n- The **FCM backend** provided by Google.\n- Your **app server** or other **trusted server environment** where your server logic runs, such as [Cloud Functions for Firebase](/docs/functions) or other cloud environments managed by Google.\n\n\u003cbr /\u003e\n\nYour app server or trusted server environment sends message requests to the FCM\nbackend, which then routes messages to client apps running on users' devices.\n\nRequirements for the trusted server environment\n\nYour app server environment must meet the following criteria:\n\n- Able to send properly formatted message requests to the FCM backend.\n- Able to handle requests and resend them using [exponential back-off.](https://developers.google.com/api-client-library/java/google-http-java-client/backoff)\n- Able to securely store server authorization credentials and client registration tokens.\n\nChoosing a server option\n\nYou'll need to decide on a way to interact with FCM servers: either using the\n[Firebase Admin SDK](/docs/cloud-messaging/server#firebase-admin-sdk-for-fcm) or the raw protocol.\nBecause of its support across popular programming languages and its convenience methods for\nhandling authentication and authorization, the Firebase Admin SDK is the recommended method.\n\nOptions for interacting with FCM servers include the following:\n\n- The Firebase Admin SDK, which has support for [Node](/docs/reference/admin/node/firebase-admin.messaging), [Java](/docs/reference/admin/java/reference/com/google/firebase/messaging/package-summary), [Python](/docs/reference/admin/python/firebase_admin.messaging), [C#](/docs/reference/admin/dotnet/namespace/firebase-admin/messaging), and [Go](//godoc.org/firebase.google.com/go/messaging).\n- The [FCM HTTP v1 API](/docs/reference/fcm/rest/v1/projects.messages), a REST API with secure authorization and flexible [cross-platform messaging capabilities](/docs/cloud-messaging/send-message#customize_messages_across_platforms) (the Firebase Admin SDK is based on this protocol and provides all of its inherent advantages).\n\nFirebase Admin SDK for FCM\n\nThe Admin FCM API handles authenticating with the backend and facilitates sending\nmessages and managing topic subscriptions. With the Firebase Admin SDK, you can:\n\n- Send messages to individual devices\n- Send messages to topics and condition statements that match one or more topics.\n- Subscribe and unsubscribe devices to and from topics\n- Construct message payloads tailored to different target platforms\n\nThe Admin Node.js SDK provides\nmethods for sending messages to device groups.\n\nTo set up the Firebase Admin SDK, see [Add the\nFirebase Admin SDK to Your Server](/docs/admin/setup). If you already have a Firebase project,\nstart with [Add the SDK](/docs/admin/setup#add-sdk). Also, make sure to enable the\nCloud Messaging API in the\n[Cloud Messaging settings page](//console.firebase.google.com/project/_/settings/cloudmessaging/)\nfor your project. Then, once the Firebase Admin SDK is installed, you can start writing logic to\n[build send requests](/docs/cloud-messaging/send-message).\n| The Firebase Admin SDK provides an API for subscribing and unsubscribing devices to and from FCM topics. These operations can subscribe or unsubscribe up to 1000 device registration tokens at a time. For more information, see [Manage topics from the server](/docs/cloud-messaging/manage-topics).\n\nFCM server protocol\n\nFCM provides the [FCM HTTP v1 API](/docs/reference/fcm/rest/v1/projects.messages) for developers who prefer a raw server protocol.\n\nTo send a message, the app server issues a POST request with\nan HTTP header and an HTTP body comprised of JSON key value pairs.\nFor details on the header and body options, see\n[Build App Server Send Requests](/docs/cloud-messaging/send-message)"]]