본문 바로가기

# 02/Android

OAuth 2.0 Playground 에서 푸시 보내기

반응형

https://developers.google.com/oauthplayground/

 

OAuth 2.0 Playground

Request Body Manual entry Enter the data that will be added to the body of the request: File You may choose to send a file as part of the request. When both a file and manual content are provided both will be sent using a multipart request. You may send fi

developers.google.com

 

 

 

1. Firebase Cloud Messaging API v1 에서 ../cloud-platform 을 선택 후 Authorize APIs 파란색 버튼을 클릭 합니다.

 

 

 

2. Exchange authorization code for tokens 파란색 버튼을 클릭 합니다.(3547초 후 갱신해줘야 됨)

 

 

3. HTTP Method POST 로 변경하고 Request URI, request body 입력 후 Send the request 파란색 버튼을 클릭하면 푸시 메시지가 바로 오는 것을 확인 할 수 있습니다.

 

 

 

Request URI : https://fcm.googleapis.com/v1/projects/[프로젝트 ID]/messages:send

 

Enter request body(예시)

     {
        "message": {
          "token": "f6D3bdBJSfWaBvICiQhwjy:APA91bG3PwlEAiHjlWnUCroSXB2j1zc3QZALbwTZeeLsonfrN1JDfqZSILTqoXkOEB8Xi1V_WAAuZz32mqmz70henwOXE9moVMhxsieZgS_9v7eKhCeU7I8BHNbCMxB2Sw4FU-YhjwrZ",
          "notification": {
            "title": "Title",
            "body": "Body",
          },
          "android": {
            "notification": {
             "channel_id": "channel_01",
            },
          },
          "data": {
            "click_action": "FLUTTER_NOTIFICATION_CLICK",
            "type": "type",
          },
        },
      }

 

 

 

 

 

 


https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages

 

REST Resource: projects.messages  |  Firebase Cloud Messaging REST API

 

firebase.google.com

https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages/send

 

Method: projects.messages.send  |  Firebase Cloud Messaging REST API

 

firebase.google.com

https://apoorv487.medium.com/testing-fcm-push-notification-http-v1-through-oauth-2-0-playground-postman-terminal-part-2-7d7a6a0e2fa0

 

Testing FCM Push Notification (HTTP v1) through OAuth 2.0 Playground/Postman/Terminal — Part 2

Tutorial to test Firebase Cloud Messaging (FCM) Push Notification (HTTP v1) through OAuth 2.0 Playground or Postman or Terminal (curl…

apoorv487.medium.com

 

 

반응형