我正在尝试使用以下代码向手机发送推送通知:
push_service = FCMNotification(api_key="xxx")
registration_id = "xxx"
message_title = "New apartment available"
message_body = address + " . Rent: " + str(price) + " €."
result = push_service.notify_single_device(registration_id=registration_id, message_title=message_title, message_body=message_body)
print(result)
它给了我以下错误:
{'multicast_ids': [8100868610517432850],
'success': 0,
'failure': 1,
'canonical_ids': 0,
'results': [{'error': 'MismatchSenderId'}],
'topic_message_id': None}
有没有办法手动设置服务器ID? api_key和registration_id应该是正确的。