<%@ codepage="65001" language="VBScript"%>
<%
Response.charset = "utf-8"
Session.CodePage = 65001
ApplicationAPIKey = "AAAAYYCIQsw:APA91bE7IZtPU_GRqwnZrfSPwmOjugh93Dww4eA4reF23FabYdHEXGUE0dTlkQzFzSlSI4l90nDjiT_Kpb4_3h65DQs9hraA1-ANCsvhu5y4i6SJZ55HRIIYFlDvw2QLJFYYkBNVtpug0th_e0uycHGQeDn0_WV1YQ"
PushServerURL = "https://fcm.googleapis.com/fcm/send"
msg_body = "홍길동기사님이 지금 출발 합니다. 잠시만 기다려주세요."
msg_title = "홍길동기사님이 배차되었습니다."
Token = "cFFnojouGH0:APA91bHSALaPZ0PQ2RdF7bnP_JK2e21fWtAlmYUW3jjULJSvlfG7qUfTtrz7_TPLZj46DbdMdbOqizT7O_VMM_9RddlvaBfUf1kLeR7gcdDoOsh8-R_SLPs_H4qnlkjoeceG4xgaaZFzYaRmaDMEXrajUWP1ZG_mNg"
postJSONData = "" & _
"{" & _
" ""to"" : """ & Token & """ " & _
", ""priority"": ""high""" & _
", ""notification"": {" & _
" ""body"" : """ & msg_body & """" & _
" , ""title"" : """ & msg_title & """" & _
" }" & _
"}"
Set httpObj = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
httpObj.open "POST" , PushServerURL, False
httpObj.SetRequestHeader "Content-Type", "application/json"
httpObj.SetRequestHeader "Authorization", "key=" & ApplicationAPIKey
httpObj.Send postJSONData
httpObj.WaitForResponse
If httpObj.Status = "200" Then
Response.Write("전송성공 : " & httpObj.ResponseText)
Else
Response.Write("전송실패 : " & httpObj.ResponseText)
End If
%>