How to send push notification via Lambda by Firebase using Python

前端 未结 1 680
长情又很酷
长情又很酷 2021-01-27 06:58

I am trying to send a push notification from Firebase Cloud Message via AWS Lambda. The API responds with authorization error.

import requests import json



        
相关标签:
1条回答
  • 2021-01-27 07:18

    Everything is perfect - except the headers. You'll have to add 'Key=' before the actual key. See the code below :

    headers = {'Content-type': 'application/json', 'Authorization':'Key=AAAA…...0HuQH'}
    
    0 讨论(0)
提交回复
热议问题