?? CURL ??? ???? Firebase ???? ?? ??? ?? ? ????. ?? ??? ??? ?? ?? OAuth 2.0 Playground? ???? ????. ?? ???? PHP ????? ???? ???. PHP?? ????? ???? ??? ??? ???? ??? ??????
curl -X POST -k -H 'Authorization: Bearer access_token_goes_here' -H 'Content-Type: application/json' -i 'https://fcm.googleapis.com/v1/projects/projectId/messages:send' --data '{ "message":{ "topic" : "newTopic", "notification" : { "body" : "This is a Firebase Cloud Messaging Topic Message!", "title" : "FCM Message" } } }
?? ???? ???? ?? ?? ?????? ???? ?????.
?? ??? ?? ??? ???? ?????. OAuth2 ??? ?? ?? API? ??? ????. https://developers.google.com/identity/protocols/oauth2/service-account#httprest
? ?? ??? JWT(Json Web Token)? ??? ????. ? JWT? ???? Bearer ??? ??? ? ????.
????$response
??? ??? ???? ????. ?? ???? ??? ? ??? ? ??? ???? ??? ??? ?? ? ??? ??? ???? ???. ? ??? ??? ?? ??? 1?????.