Since Google forbids new Huawei devices from using GMS, Huawei mobile phone users of my app often complain that they can't receive notification messages. So I recently started using HUAWEI Push Kit. The integration process is smooth. I have finished the integration and released my app on HUAWEI AppGallery. The users can now receive notification messages.
But now I've found the following problem relating to push data:
With FCM, I can use BigQuery to further analyze message push data, such as the number of sent messages and the number of received messages. For example, I can execute the following statement to collect statistical data on the number of sent messages by app:
SELECT app_name, COUNT(1)
FROM `project ID.firebase_messaging.data`
WHERE
_PARTITIONTIME = TIMESTAMP('date as YYYY-MM-DD')
AND event = 'MESSAGE_ACCEPTED'
AND message_id! =''
GROUP BY 1;
I read the HUAWEI Push Kit documents but did not find a function similar to BigQuery.
However, I found the message receipt, which can also be used for collecting statistical data. Therefore, I developed a receipt API and configured it on the Push Kit console. After testing, I can now receive the push data.
Now, when I plan to release my app, I need to verify the caller because the message receipt API is publicly available on the public network. How can I verify the caller to prevent malicious API calling?